Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/wineoss.drv/midi.c | 17 ----------------- dlls/wineoss.drv/ossmidi.c | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/dlls/wineoss.drv/midi.c b/dlls/wineoss.drv/midi.c index 8d4c9bab68c..9df97530865 100644 --- a/dlls/wineoss.drv/midi.c +++ b/dlls/wineoss.drv/midi.c @@ -490,21 +490,6 @@ static DWORD midClose(WORD wDevID) return ret; }
-/************************************************************************** - * midStart [internal] - */ -static DWORD midStart(WORD wDevID) -{ - TRACE("(%04X);\n", wDevID); - - if (wDevID >= MIDM_NumDevs) return MMSYSERR_BADDEVICEID; - if (MidiInDev[wDevID].state == -1) return MIDIERR_NODEVICE; - - MidiInDev[wDevID].state = 1; - MidiInDev[wDevID].startTime = GetTickCount(); - return MMSYSERR_NOERROR; -} - /************************************************************************** * midStop [internal] */ @@ -544,8 +529,6 @@ DWORD WINAPI OSS_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, return midOpen(wDevID, (LPMIDIOPENDESC)dwParam1, dwParam2); case MIDM_CLOSE: return midClose(wDevID); - case MIDM_START: - return midStart(wDevID); case MIDM_STOP: return midStop(wDevID); } diff --git a/dlls/wineoss.drv/ossmidi.c b/dlls/wineoss.drv/ossmidi.c index d63ba936239..091eccd6d53 100644 --- a/dlls/wineoss.drv/ossmidi.c +++ b/dlls/wineoss.drv/ossmidi.c @@ -1210,6 +1210,21 @@ static UINT midi_in_get_devcaps(WORD dev_id, MIDIINCAPSW *caps, UINT size) return MMSYSERR_NOERROR; }
+static UINT midi_in_start(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 = 1; + src->startTime = NtGetTickCount(); + return MMSYSERR_NOERROR; +} + static UINT midi_in_reset(WORD dev_id, struct notify_context *notify) { UINT cur_time = NtGetTickCount(); @@ -1322,6 +1337,9 @@ NTSTATUS midi_in_message(void *args) case MIDM_GETNUMDEVS: *params->err = num_srcs; break; + case MIDM_START: + *params->err = midi_in_start(params->dev_id); + break; case MIDM_RESET: *params->err = midi_in_reset(params->dev_id, params->notify); break;
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Wed, Apr 27, 2022 at 08:03:19AM +0100, Huw Davies wrote:
Signed-off-by: Huw Davies huw@codeweavers.com
dlls/wineoss.drv/midi.c | 17 ----------------- dlls/wineoss.drv/ossmidi.c | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/dlls/wineoss.drv/midi.c b/dlls/wineoss.drv/midi.c index 8d4c9bab68c..9df97530865 100644 --- a/dlls/wineoss.drv/midi.c +++ b/dlls/wineoss.drv/midi.c @@ -490,21 +490,6 @@ static DWORD midClose(WORD wDevID) return ret; }
-/**************************************************************************
midStart [internal]
- */
-static DWORD midStart(WORD wDevID) -{
- TRACE("(%04X);\n", wDevID);
- if (wDevID >= MIDM_NumDevs) return MMSYSERR_BADDEVICEID;
- if (MidiInDev[wDevID].state == -1) return MIDIERR_NODEVICE;
- MidiInDev[wDevID].state = 1;
- MidiInDev[wDevID].startTime = GetTickCount();
- return MMSYSERR_NOERROR;
-}
/**************************************************************************
midStop [internal]
*/ @@ -544,8 +529,6 @@ DWORD WINAPI OSS_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, return midOpen(wDevID, (LPMIDIOPENDESC)dwParam1, dwParam2); case MIDM_CLOSE: return midClose(wDevID);
- case MIDM_START:
- return midStart(wDevID); case MIDM_STOP: return midStop(wDevID); }
diff --git a/dlls/wineoss.drv/ossmidi.c b/dlls/wineoss.drv/ossmidi.c index d63ba936239..091eccd6d53 100644 --- a/dlls/wineoss.drv/ossmidi.c +++ b/dlls/wineoss.drv/ossmidi.c @@ -1210,6 +1210,21 @@ static UINT midi_in_get_devcaps(WORD dev_id, MIDIINCAPSW *caps, UINT size) return MMSYSERR_NOERROR; }
+static UINT midi_in_start(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 = 1;
- src->startTime = NtGetTickCount();
- return MMSYSERR_NOERROR;
+}
static UINT midi_in_reset(WORD dev_id, struct notify_context *notify) { UINT cur_time = NtGetTickCount(); @@ -1322,6 +1337,9 @@ NTSTATUS midi_in_message(void *args) case MIDM_GETNUMDEVS: *params->err = num_srcs; break;
- case MIDM_START:
*params->err = midi_in_start(params->dev_id);
case MIDM_RESET: *params->err = midi_in_reset(params->dev_id, params->notify); break;break;
-- 2.25.1