>From 5aebb4ec939e97fae944793dcc96cdabd6814c08 Mon Sep 17 00:00:00 2001 From: Michael Kainer Date: Wed, 4 Feb 2009 18:31:06 +0100 Subject: Fixed bug #15503. --- dlls/dsound/mixer.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index d014c4b..d5c9461 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -580,6 +580,13 @@ static DWORD DSOUND_MixOne(IDirectSoundBufferImpl *dsb, DWORD writepos, DWORD mi TRACE("writepos=%d, buf_mixpos=%d, primary_mixpos=%d, mixlen=%d\n", writepos, dsb->buf_mixpos, dsb->primary_mixpos, mixlen); TRACE("looping=%d, leadin=%d, buflen=%d\n", dsb->playflags, dsb->leadin, dsb->tmp_buffer_len); + /* If mixlen is 0 there is nothing to do */ + if (mixlen <= 0) + { + TRACE("mixlen=%d returning\n", mixlen); + return 0; + } + /* If leading in, only mix about 20 ms, and 'skip' mixing the rest, for more fluid pointer advancement */ if (dsb->leadin && dsb->state == STATE_STARTING) { -- 1.6.1.2