From 6e8c8c28ebbdc15292612b7b6657e44ce8c5040f Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Fri, 14 Mar 2008 19:54:35 +0900 Subject: [PATCH] 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. --- dlls/dsound/mixer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index 0e76adfe3bd..384709aa68a 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -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 */