Joerg-Cyril.Hoehle@t-systems.com writes:
@@ -1006,7 +1008,9 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI LPMIDIHDR lpMidiHdr; LPMIDIHDR* lpmh; LPBYTE lpData;
- BOOL paused = FALSE;
+still_paused: switch (msg->message) { case WM_QUIT: SetEvent(lpMidiStrm->hEvent); @@ -1028,6 +1032,16 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI } lpMidiStrm->lpMidiHdr = 0; SetEvent(lpMidiStrm->hEvent);
- return TRUE;
- case WINE_MSM_RESUME:
- /* FIXME: send out cc64 0 (turn off sustain pedal) on every channel */
- lpMidiStrm->dwStartTicks = GetTickCount() - lpMidiStrm->dwPositionMS;
- SetEvent(lpMidiStrm->hEvent);
- return TRUE;
- case WINE_MSM_PAUSE:
- /* FIXME: send out cc64 0 (turn off sustain pedal) on every channel */
- paused = TRUE;
- SetEvent(lpMidiStrm->hEvent); break; case WINE_MSM_HEADER: /* sets initial tick count for first MIDIHDR */
@@ -1114,6 +1128,10 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI FIXME("Unknown message %d\n", msg->message); break; }
- if (paused) {
- GetMessageA(msg, 0, 0, 0);
- goto still_paused;
- }
Please stop abusing goto, write a proper loop instead.