Commit 63bc9868 authored by Emmanuel Maillard's avatar Emmanuel Maillard Committed by Alexandre Julliard

winecoreaudio: Implement MIDIIn_GetNumDevs and MIDIIn_GetDevCaps.

parent 3930b756
......@@ -652,6 +652,28 @@ static DWORD MIDIIn_Close(WORD wDevID)
return ret;
}
static DWORD MIDIIn_GetDevCaps(WORD wDevID, LPMIDIINCAPSW lpCaps, DWORD dwSize)
{
TRACE("wDevID=%d lpCaps=%p dwSize=%d\n", wDevID, lpCaps, dwSize);
if (lpCaps == NULL) {
WARN("Invalid Parameter\n");
return MMSYSERR_INVALPARAM;
}
if (wDevID >= MIDIIn_NumDevs) {
WARN("bad device ID : %d\n", wDevID);
return MMSYSERR_BADDEVICEID;
}
memcpy(lpCaps, &sources[wDevID].caps, min(dwSize, sizeof(*lpCaps)));
return MMSYSERR_NOERROR;
}
static DWORD MIDIIn_GetNumDevs(void)
{
TRACE("\n");
return MIDIIn_NumDevs;
}
/*
* MIDI In Mach message handling
......@@ -782,8 +804,14 @@ DWORD WINAPI CoreAudio_midMessage(UINT wDevID, UINT wMsg, DWORD dwUser, DWORD dw
case MIDM_ADDBUFFER:
case MIDM_PREPARE:
case MIDM_UNPREPARE:
TRACE("Unsupported message\n");
return MMSYSERR_NOTSUPPORTED;
case MIDM_GETDEVCAPS:
return MIDIIn_GetDevCaps(wDevID, (LPMIDIINCAPSW) dwParam1, dwParam2);
case MIDM_GETNUMDEVS:
return MIDIIn_GetNumDevs();
case MIDM_START:
case MIDM_STOP:
case MIDM_RESET:
......
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