Matteo Bruni (@Mystral) commented about dlls/dsound/mixer.c:
- /* - * Some audio drivers are retarded and won't fire after being - * stopped, add a timeout to handle this. - */ - ret = WaitForSingleObject(dev->sleepev, dev->sleeptime); + /* + * Some audio drivers are retarded and won't fire after being + * stopped, add a timeout to handle this. + */ + while ((ret = WaitForMultipleObjects(ARRAY_SIZE(handles), handles, FALSE, dev->sleeptime)) != WAIT_OBJECT_0) + { if (ret == WAIT_FAILED) WARN("wait returned error %lu %08lx!\n", GetLastError(), GetLastError()); - else if (ret != WAIT_OBJECT_0) + else if (ret != WAIT_OBJECT_0 + 1) WARN("wait returned %08lx!\n", ret); This would trigger the `WARN()` when the `stopev` event fires.
I don't think a new event is necessary in the first place though. I tweaked the patch slightly in !10919. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10882#note_140105