dsound: Fix notification order.

This commit is contained in:
Ulrich Hecht 2008-07-24 13:12:39 +02:00 committed by Alexandre Julliard
parent 289ea33803
commit 335dec27b7
1 changed files with 4 additions and 3 deletions

View File

@ -240,6 +240,8 @@ void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len
i, offset, event->hEventNotify); i, offset, event->hEventNotify);
/* DSBPN_OFFSETSTOP has to be the last element. So this is */ /* DSBPN_OFFSETSTOP has to be the last element. So this is */
/* OK. [Inside DirectX, p274] */ /* OK. [Inside DirectX, p274] */
/* Windows does not seem to enforce this, and some apps rely */
/* on that, so we can't stop there. */
/* */ /* */
/* This also means we can't sort the entries by offset, */ /* This also means we can't sort the entries by offset, */
/* because DSBPN_OFFSETSTOP == -1 */ /* because DSBPN_OFFSETSTOP == -1 */
@ -247,9 +249,8 @@ void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len
if (dsb->state == STATE_STOPPED) { if (dsb->state == STATE_STOPPED) {
SetEvent(event->hEventNotify); SetEvent(event->hEventNotify);
TRACE("signalled event %p (%d)\n", event->hEventNotify, i); TRACE("signalled event %p (%d)\n", event->hEventNotify, i);
return; }
} else continue;
return;
} }
if ((playpos + len) >= dsb->buflen) { if ((playpos + len) >= dsb->buflen) {
if ((offset < ((playpos + len) % dsb->buflen)) || if ((offset < ((playpos + len) % dsb->buflen)) ||