Commit 6e8c8c28 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

dsound: Set the status from STATE_STARTING to STATE_PLAYING before mixing our…

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.
parent 69272d1f
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment