From bb13f7f23416bc2d12c2ac9ee7ab143aef01e970 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 24 Nov 2010 07:20:41 -0800 Subject: [PATCH] Make sure the buffer padding is always cleared before looking for the next buffer --- Alc/mixer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Alc/mixer.c b/Alc/mixer.c index 092c01e2..7b525bec 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -642,6 +642,7 @@ ALvoid MixSource(ALsource *Source, ALCdevice *Device, ALuint SamplesToDo) if(DataPosInt >= DataSize) goto skipmix; + memset(&Data.p8[DataSize*Channels*Bytes], 0, BUFFER_PADDING*Channels*Bytes); if(BufferListItem->next) { ALbuffer *NextBuf = BufferListItem->next->buffer; @@ -665,8 +666,6 @@ ALvoid MixSource(ALsource *Source, ALCdevice *Device, ALuint SamplesToDo) ulExtraSamples); } } - else - memset(&Data.p8[DataSize*Channels*Bytes], 0, (BUFFER_PADDING*Channels*Bytes)); /* Figure out how many samples we can mix. */ increment = Source->Params.Step; -- 2.11.4.GIT