Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Thu, Mar 17, 2022 at 08:14:07AM +0000, Huw Davies wrote:
Signed-off-by: Huw Davies huw@codeweavers.com
dlls/winealsa.drv/alsamidi.c | 15 +++++++++++++++ dlls/winealsa.drv/midi.c | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/winealsa.drv/alsamidi.c b/dlls/winealsa.drv/alsamidi.c index fa09626bc80..f3de2a5ce07 100644 --- a/dlls/winealsa.drv/alsamidi.c +++ b/dlls/winealsa.drv/alsamidi.c @@ -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;
default: TRACE("Unsupported message\n"); *params->err = MMSYSERR_NOTSUPPORTED;break;
diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c index 4b8062390fa..0ed2feb41eb 100644 --- a/dlls/winealsa.drv/midi.c +++ b/dlls/winealsa.drv/midi.c @@ -605,17 +605,6 @@ static DWORD midStop(WORD wDevID) 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]
*/ @@ -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); }
-- 2.25.1