winealsa: Move MODM_GETDEVAPS to the unixlib.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3ec6e069f3
commit
647f227787
|
@ -779,6 +779,18 @@ static UINT midi_out_unprepare(WORD dev_id, MIDIHDR *hdr, UINT hdr_size)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
static UINT midi_out_get_devcaps(WORD dev_id, MIDIOUTCAPSW *caps, UINT size)
|
||||
{
|
||||
TRACE("(%04X, %p, %08X);\n", dev_id, caps, size);
|
||||
|
||||
if (dev_id >= num_dests) return MMSYSERR_BADDEVICEID;
|
||||
if (!caps) return MMSYSERR_INVALPARAM;
|
||||
|
||||
memcpy(caps, &dests[dev_id].caps, min(size, sizeof(*caps)));
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
NTSTATUS midi_out_message(void *args)
|
||||
{
|
||||
struct midi_out_message_params *params = args;
|
||||
|
@ -811,6 +823,9 @@ NTSTATUS midi_out_message(void *args)
|
|||
case MODM_UNPREPARE:
|
||||
*params->err = midi_out_unprepare(params->dev_id, (MIDIHDR *)params->param_1, params->param_2);
|
||||
break;
|
||||
case MODM_GETDEVCAPS:
|
||||
*params->err = midi_out_get_devcaps(params->dev_id, (MIDIOUTCAPSW *)params->param_1, params->param_2);
|
||||
break;
|
||||
default:
|
||||
TRACE("Unsupported message\n");
|
||||
*params->err = MMSYSERR_NOTSUPPORTED;
|
||||
|
|
|
@ -605,21 +605,6 @@ static DWORD midStop(WORD wDevID)
|
|||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* modGetDevCaps [internal]
|
||||
*/
|
||||
static DWORD modGetDevCaps(WORD wDevID, LPMIDIOUTCAPSW lpCaps, DWORD dwSize)
|
||||
{
|
||||
TRACE("(%04X, %p, %08X);\n", wDevID, lpCaps, dwSize);
|
||||
|
||||
if (wDevID >= MODM_NumDevs) return MMSYSERR_BADDEVICEID;
|
||||
if (lpCaps == NULL) return MMSYSERR_INVALPARAM;
|
||||
|
||||
memcpy(lpCaps, &MidiOutDev[wDevID].caps, min(dwSize, sizeof(*lpCaps)));
|
||||
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* modGetVolume [internal]
|
||||
*/
|
||||
|
@ -747,8 +732,6 @@ DWORD WINAPI ALSA_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
|
|||
case DRVM_INIT:
|
||||
ALSA_MidiInit();
|
||||
return 0;
|
||||
case MODM_GETDEVCAPS:
|
||||
return modGetDevCaps(wDevID, (LPMIDIOUTCAPSW)dwParam1, dwParam2);
|
||||
case MODM_GETNUMDEVS:
|
||||
return MODM_NumDevs;
|
||||
case MODM_GETVOLUME:
|
||||
|
|
Loading…
Reference in New Issue