winealsa: 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
3809b7a101
commit
d76fccfe7f
|
@ -791,6 +791,15 @@ static UINT midi_out_get_devcaps(WORD dev_id, MIDIOUTCAPSW *caps, UINT size)
|
||||||
return MMSYSERR_NOERROR;
|
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)
|
NTSTATUS midi_out_message(void *args)
|
||||||
{
|
{
|
||||||
struct midi_out_message_params *params = args;
|
struct midi_out_message_params *params = args;
|
||||||
|
@ -829,6 +838,12 @@ NTSTATUS midi_out_message(void *args)
|
||||||
case MODM_GETNUMDEVS:
|
case MODM_GETNUMDEVS:
|
||||||
*params->err = num_dests;
|
*params->err = num_dests;
|
||||||
break;
|
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:
|
default:
|
||||||
TRACE("Unsupported message\n");
|
TRACE("Unsupported message\n");
|
||||||
*params->err = MMSYSERR_NOTSUPPORTED;
|
*params->err = MMSYSERR_NOTSUPPORTED;
|
||||||
|
|
|
@ -605,17 +605,6 @@ static DWORD midStop(WORD wDevID)
|
||||||
return MMSYSERR_NOERROR;
|
return MMSYSERR_NOERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* modReset [internal]
|
* modReset [internal]
|
||||||
*/
|
*/
|
||||||
|
@ -732,10 +721,6 @@ DWORD WINAPI ALSA_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
|
||||||
case DRVM_INIT:
|
case DRVM_INIT:
|
||||||
ALSA_MidiInit();
|
ALSA_MidiInit();
|
||||||
return 0;
|
return 0;
|
||||||
case MODM_GETVOLUME:
|
|
||||||
return modGetVolume(wDevID, (DWORD*)dwParam1);
|
|
||||||
case MODM_SETVOLUME:
|
|
||||||
return 0;
|
|
||||||
case MODM_RESET:
|
case MODM_RESET:
|
||||||
return modReset(wDevID);
|
return modReset(wDevID);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue