http://bugs.winehq.org/show_bug.cgi?id=13046
--- Comment #6 from Ben Mayhew ben-dev@gmx.net 2008-05-09 11:32:08 --- Created an attachment (id=12842) --> (http://bugs.winehq.org/attachment.cgi?id=12842) -d3d_draw,+dsound and some custom debug
I think I've found the direct cause of the problems. I added some debug to WaitForMultipleObjects and compared the handles to the ones passed to SetNotificationPositions.
It looks like the app doesn't always wait for the notifications (i.e. 0xac & 0xd0 are left out of the call to WaitForMultipleObjects) and thus the thread doesn't get woken up in time for the audio.
If this analysis is correct then that suggests that the real problem is that one of the other events is not being sent when it should. (And I thought this couldn't get any more complicated :-( ).