Commit 38e3f3f3 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

wineoss: Move MIDM_STOP to the unixlib.

parent b50f9f0a
...@@ -490,20 +490,6 @@ static DWORD midClose(WORD wDevID) ...@@ -490,20 +490,6 @@ static DWORD midClose(WORD wDevID)
return ret; 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 * * MIDI entry points *
*======================================================================*/ *======================================================================*/
...@@ -529,8 +515,6 @@ DWORD WINAPI OSS_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, ...@@ -529,8 +515,6 @@ DWORD WINAPI OSS_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
return midOpen(wDevID, (LPMIDIOPENDESC)dwParam1, dwParam2); return midOpen(wDevID, (LPMIDIOPENDESC)dwParam1, dwParam2);
case MIDM_CLOSE: case MIDM_CLOSE:
return midClose(wDevID); return midClose(wDevID);
case MIDM_STOP:
return midStop(wDevID);
} }
params.dev_id = wDevID; params.dev_id = wDevID;
......
...@@ -1225,6 +1225,20 @@ static UINT midi_in_start(WORD dev_id) ...@@ -1225,6 +1225,20 @@ static UINT midi_in_start(WORD dev_id)
return MMSYSERR_NOERROR; 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 UINT midi_in_reset(WORD dev_id, struct notify_context *notify) static UINT midi_in_reset(WORD dev_id, struct notify_context *notify)
{ {
UINT cur_time = NtGetTickCount(); UINT cur_time = NtGetTickCount();
...@@ -1340,6 +1354,9 @@ NTSTATUS midi_in_message(void *args) ...@@ -1340,6 +1354,9 @@ NTSTATUS midi_in_message(void *args)
case MIDM_START: case MIDM_START:
*params->err = midi_in_start(params->dev_id); *params->err = midi_in_start(params->dev_id);
break; break;
case MIDM_STOP:
*params->err = midi_in_stop(params->dev_id);
break;
case MIDM_RESET: case MIDM_RESET:
*params->err = midi_in_reset(params->dev_id, params->notify); *params->err = midi_in_reset(params->dev_id, params->notify);
break; break;
......
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