Commit d76fccfe authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

winealsa: Move MODM_GETVOLUME and MODM_SETVOLUME to the unixlib.

parent 3809b7a1
......@@ -791,6 +791,15 @@ 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)
{
struct midi_out_message_params *params = args;
......@@ -829,6 +838,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;
......
......@@ -606,17 +606,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;
}
/**************************************************************************
* modReset [internal]
*/
static DWORD modReset(WORD wDevID)
......@@ -732,10 +721,6 @@ DWORD WINAPI ALSA_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
case DRVM_INIT:
ALSA_MidiInit();
return 0;
case MODM_GETVOLUME:
return modGetVolume(wDevID, (DWORD*)dwParam1);
case MODM_SETVOLUME:
return 0;
case MODM_RESET:
return modReset(wDevID);
}
......
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