Commit 185d98bb authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

winmm: Fix MEVT_LONGMSG handling in MIDI stream.

parent cc78101f
......@@ -819,7 +819,7 @@ static void test_midiStream(UINT udev, HWND hwnd)
e->dwEvent = MEVT_F_LONG | sizeof(SysEx_volume_off);
memcpy(&e->dwParms[0], SysEx_volume_off, sizeof(SysEx_volume_off));
p += sizeof(MIDISHORTEVENT) + ROUNDUP4(sizeof(SysEx_volume_off));
/* Note On (FIXME: we shouldn't hear this voice due to volume settings) */
/* Note On (We can't hear this voice due to volume settings) */
e = (MIDIEVENT *)p;
e->dwEvent = MEVT_F_SHORT | 0x6F4593; /* note #69 */
p += sizeof(MIDISHORTEVENT);
......
......@@ -1169,8 +1169,16 @@ start_header:
/* do nothing, skip bytes */
break;
case MEVT_LONGMSG:
midiOutLongMsg(lpMidiStrm->hDevice, lpMidiStrm->lpMidiHdr, MEVT_EVENTPARM(me->dwEvent));
break;
{
MIDIHDR mh;
memset(&mh, 0, sizeof(mh));
mh.lpData = (LPSTR)me->dwParms;
mh.dwBufferLength = MEVT_EVENTPARM(me->dwEvent);
midiOutPrepareHeader(lpMidiStrm->hDevice, &mh, sizeof(mh));
midiOutLongMsg(lpMidiStrm->hDevice, &mh, sizeof(mh));
midiOutUnprepareHeader(lpMidiStrm->hDevice, &mh, sizeof(mh));
break;
}
case MEVT_NOP:
break;
case MEVT_SHORTMSG:
......
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