Commit bceee275 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

midimap: Support midiOutGetVolume, returning FFFFFFFF.

parent a758c6a9
...@@ -430,6 +430,22 @@ static DWORD modUnprepare(MIDIMAPDATA* mom, LPMIDIHDR lpMidiHdr, DWORD_PTR dwPar ...@@ -430,6 +430,22 @@ static DWORD modUnprepare(MIDIMAPDATA* mom, LPMIDIHDR lpMidiHdr, DWORD_PTR dwPar
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
static DWORD modGetVolume(MIDIMAPDATA* mom, DWORD* lpdwVolume)
{
if (MIDIMAP_IsBadData(mom)) return MMSYSERR_ERROR;
if (!lpdwVolume) return MMSYSERR_INVALPARAM;
*lpdwVolume = 0xFFFFFFFF; /* tests show this initial value */
return MMSYSERR_NOERROR;
}
static DWORD modSetVolume(MIDIMAPDATA* mom, DWORD dwVolume)
{
/* Native forwards it to some underlying device
* GetVolume returns what was last set here. */
FIXME("stub\n");
return MMSYSERR_NOERROR;
}
static DWORD modGetDevCaps(UINT wDevID, MIDIMAPDATA* mom, LPMIDIOUTCAPSW lpMidiCaps, DWORD_PTR size) static DWORD modGetDevCaps(UINT wDevID, MIDIMAPDATA* mom, LPMIDIOUTCAPSW lpMidiCaps, DWORD_PTR size)
{ {
static const WCHAR name[] = {'W','i','n','e',' ','m','i','d','i',' ','m','a','p','p','e','r',0}; static const WCHAR name[] = {'W','i','n','e',' ','m','i','d','i',' ','m','a','p','p','e','r',0};
...@@ -441,7 +457,8 @@ static DWORD modGetDevCaps(UINT wDevID, MIDIMAPDATA* mom, LPMIDIOUTCAPSW lpMidiC ...@@ -441,7 +457,8 @@ static DWORD modGetDevCaps(UINT wDevID, MIDIMAPDATA* mom, LPMIDIOUTCAPSW lpMidiC
lpMidiCaps->wVoices = 0; lpMidiCaps->wVoices = 0;
lpMidiCaps->wNotes = 0; lpMidiCaps->wNotes = 0;
lpMidiCaps->wChannelMask = 0xFFFF; lpMidiCaps->wChannelMask = 0xFFFF;
lpMidiCaps->dwSupport = 0L; /* Native returns volume caps of underlying device | MIDICAPS_STREAM */
lpMidiCaps->dwSupport = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME;
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
...@@ -494,8 +511,8 @@ DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, ...@@ -494,8 +511,8 @@ DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
case MODM_GETDEVCAPS: return modGetDevCaps (wDevID, (MIDIMAPDATA*)dwUser, (LPMIDIOUTCAPSW)dwParam1,dwParam2); case MODM_GETDEVCAPS: return modGetDevCaps (wDevID, (MIDIMAPDATA*)dwUser, (LPMIDIOUTCAPSW)dwParam1,dwParam2);
case MODM_GETNUMDEVS: return 1; case MODM_GETNUMDEVS: return 1;
case MODM_GETVOLUME: return MMSYSERR_NOTSUPPORTED; case MODM_GETVOLUME: return modGetVolume ((MIDIMAPDATA*)dwUser, (DWORD*)dwParam1);
case MODM_SETVOLUME: return MMSYSERR_NOTSUPPORTED; case MODM_SETVOLUME: return modSetVolume ((MIDIMAPDATA*)dwUser, dwParam1);
default: default:
FIXME("unknown message %d!\n", wMsg); FIXME("unknown message %d!\n", wMsg);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment