Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Wed, Mar 23, 2022 at 08:16:52AM +0000, Huw Davies wrote:
Signed-off-by: Huw Davies huw@codeweavers.com
dlls/winealsa.drv/alsamidi.c | 17 +++++++++++++++++ dlls/winealsa.drv/midi.c | 16 ---------------- 2 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/dlls/winealsa.drv/alsamidi.c b/dlls/winealsa.drv/alsamidi.c index d647ba79a9e..ccdb35731d1 100644 --- a/dlls/winealsa.drv/alsamidi.c +++ b/dlls/winealsa.drv/alsamidi.c @@ -957,6 +957,20 @@ static UINT midi_in_start(WORD dev_id) return MMSYSERR_NOERROR; }
+static UINT midi_in_stop(WORD dev_id) +{
- struct midi_src *src;
- TRACE("(%04X);\n", dev_id);
- if (dev_id >= num_srcs) return MMSYSERR_BADDEVICEID;
- src = srcs + dev_id;
- if (src->state == -1) return MIDIERR_NODEVICE;
- src->state = 0;
- return MMSYSERR_NOERROR;
+}
static DWORD midi_in_reset(WORD dev_id, struct notify_context *notify) { UINT cur_time = NtGetTickCount(); @@ -1074,6 +1088,9 @@ NTSTATUS midi_in_message(void *args) case MIDM_START: *params->err = midi_in_start(params->dev_id); break;
- case MIDM_STOP:
*params->err = midi_in_stop(params->dev_id);
case MIDM_RESET: *params->err = midi_in_reset(params->dev_id, params->notify); break;break;
diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c index 88b23f52ec1..35678588549 100644 --- a/dlls/winealsa.drv/midi.c +++ b/dlls/winealsa.drv/midi.c @@ -459,20 +459,6 @@ static DWORD midClose(WORD wDevID) return ret; }
-/**************************************************************************
midStop [internal]
- */
-static DWORD midStop(WORD wDevID) -{
- TRACE("(%04X);\n", wDevID);
- if (wDevID >= MIDM_NumDevs) return MMSYSERR_BADDEVICEID;
- if (MidiInDev[wDevID].state == -1) return MIDIERR_NODEVICE;
- MidiInDev[wDevID].state = 0;
- return MMSYSERR_NOERROR;
-}
/*======================================================================*
MIDI entry points *
*======================================================================*/ @@ -518,8 +504,6 @@ DWORD WINAPI ALSA_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, return midOpen(wDevID, (LPMIDIOPENDESC)dwParam1, dwParam2); case MIDM_CLOSE: return midClose(wDevID);
case MIDM_STOP:
return midStop(wDevID); }
params.dev_id = wDevID;
-- 2.25.1