mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wineoss: Move MODM_GETVOLUME and MODM_SETVOLUME to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
19c20d6ae2
commit
03d2bddc95
2 changed files with 14 additions and 15 deletions
|
@ -648,17 +648,6 @@ static DWORD midStop(WORD wDevID)
|
|||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
/**************************************************************************
|
||||
* modGetVolume [internal]
|
||||
*/
|
||||
static DWORD modGetVolume(WORD wDevID, DWORD* lpdwVolume)
|
||||
{
|
||||
if (!lpdwVolume) return MMSYSERR_INVALPARAM;
|
||||
if (wDevID >= MODM_NumDevs) return MMSYSERR_BADDEVICEID;
|
||||
*lpdwVolume = 0xFFFFFFFF;
|
||||
return (MidiOutDev[wDevID].caps.dwSupport & MIDICAPS_VOLUME) ? 0 : MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
DWORD WINAPI OSS_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
|
||||
DWORD_PTR dwParam1, DWORD_PTR dwParam2);
|
||||
|
||||
|
@ -753,10 +742,6 @@ DWORD WINAPI OSS_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
|
|||
return OSS_MidiInit();
|
||||
case DRVM_EXIT:
|
||||
return OSS_MidiExit();
|
||||
case MODM_GETVOLUME:
|
||||
return modGetVolume(wDevID, (DWORD*)dwParam1);
|
||||
case MODM_SETVOLUME:
|
||||
return 0;
|
||||
case MODM_RESET:
|
||||
return modReset(wDevID);
|
||||
}
|
||||
|
|
|
@ -1056,6 +1056,14 @@ static UINT midi_out_get_devcaps(WORD dev_id, MIDIOUTCAPSW *caps, UINT size)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static UINT midi_out_get_volume(WORD dev_id, UINT *volume)
|
||||
{
|
||||
if (!volume) return MMSYSERR_INVALPARAM;
|
||||
if (dev_id >= num_dests) return MMSYSERR_BADDEVICEID;
|
||||
|
||||
*volume = 0xFFFFFFFF;
|
||||
return (dests[dev_id].caps.dwSupport & MIDICAPS_VOLUME) ? 0 : MMSYSERR_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
NTSTATUS midi_out_message(void *args)
|
||||
{
|
||||
|
@ -1094,6 +1102,12 @@ NTSTATUS midi_out_message(void *args)
|
|||
case MODM_GETNUMDEVS:
|
||||
*params->err = num_dests;
|
||||
break;
|
||||
case MODM_GETVOLUME:
|
||||
*params->err = midi_out_get_volume(params->dev_id, (UINT *)params->param_1);
|
||||
break;
|
||||
case MODM_SETVOLUME:
|
||||
*params->err = 0;
|
||||
break;
|
||||
default:
|
||||
TRACE("Unsupported message\n");
|
||||
*params->err = MMSYSERR_NOTSUPPORTED;
|
||||
|
|
Loading…
Reference in a new issue