dsound: Set the status from STATE_STARTING to STATE_PLAYING before mixing our next buffer so that we do not potentially skip early event when starting.

This commit is contained in:
Aric Stewart 2008-03-14 19:54:35 +09:00 committed by Alexandre Julliard
parent 69272d1f52
commit 6e8c8c28eb
1 changed files with 3 additions and 3 deletions

View File

@ -669,13 +669,13 @@ static DWORD DSOUND_MixToPrimary(const DirectSoundDevice *device, DWORD writepos
dsb->primary_mixpos = writepos;
}
/* mix next buffer into the main buffer */
len = DSOUND_MixOne(dsb, writepos, mixlen);
/* if the buffer was starting, it must be playing now */
if (dsb->state == STATE_STARTING)
dsb->state = STATE_PLAYING;
/* mix next buffer into the main buffer */
len = DSOUND_MixOne(dsb, writepos, mixlen);
if (!minlen) minlen = len;
/* record the minimum length mixed from all buffers */