Fixed recursion count while calling midiStream(Pause|Restart).
This commit is contained in:
parent
f49cb52c69
commit
78044a2d1e
|
@ -3468,7 +3468,15 @@ MMRESULT WINAPI midiStreamRestart(HMIDISTRM hMidiStrm)
|
|||
if (!MMSYSTEM_GetMidiStream(hMidiStrm, &lpMidiStrm, NULL)) {
|
||||
ret = MMSYSERR_INVALHANDLE;
|
||||
} else {
|
||||
if (ResumeThread(lpMidiStrm->hThread) == 0xFFFFFFFF) {
|
||||
DWORD ret;
|
||||
|
||||
/* since we increase the thread suspend count on each midiStreamPause
|
||||
* there may be a need for several midiStreamResume
|
||||
*/
|
||||
do {
|
||||
ret = ResumeThread(lpMidiStrm->hThread);
|
||||
} while (ret != 0xFFFFFFFF && ret != 0);
|
||||
if (ret == 0xFFFFFFFF) {
|
||||
WARN("bad Resume (%ld)\n", GetLastError());
|
||||
ret = MMSYSERR_ERROR;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue