Module: wine Branch: master Commit: 6e8c8c28ebbdc15292612b7b6657e44ce8c5040f URL: http://source.winehq.org/git/wine.git/?a=commit;h=6e8c8c28ebbdc15292612b7b66...
Author: Aric Stewart aric@codeweavers.com Date: Fri Mar 14 19:54:35 2008 +0900
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 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index 0e76adf..384709a 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 */