From b92680d306423a183da783f722c19ed8dcc89eed Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 13 Aug 2012 21:11:29 +0200 Subject: [PATCH] dsound-fixup-loop --- dlls/dsound/dsound.c | 2 +- dlls/dsound/mixer.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index bccda9575ff..fddc97a9103 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -741,7 +741,7 @@ HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGUID lpcG device->mmdevice = mmdevice; device->guid = devGUID; - device->sleepev = CreateEventExW(0, 0, 0, 0); + device->sleepev = CreateEventW(0, 0, 0, 0); hr = DSOUND_ReopenDevice(device, FALSE); if (FAILED(hr)) diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index fad88ee8b8b..b3aa1d1949e 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -752,10 +752,14 @@ DWORD CALLBACK DSOUND_mixthread(void *p) TRACE("(%p)\n", dev); while (dev->ref) { + DWORD ret; /* ALSA is retarded, add a timeout.. */ - if (WaitForSingleObject(dev->sleepev, 25) == WAIT_TIMEOUT) - WARN("wait timed out!\n"); + ret = WaitForSingleObject(dev->sleepev, 25); + if (ret == WAIT_FAILED) + WARN("wait returned error %u %08x!\n", GetLastError(), GetLastError()); + else if (ret) + WARN("wait returned %08x!\n", ret); if (!dev->ref) break; -- 2.11.4.GIT