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:
parent
69272d1f52
commit
6e8c8c28eb
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue