aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-11-24 07:20:41 -0800
committerChris Robinson <[email protected]>2010-11-24 07:20:41 -0800
commitbb13f7f23416bc2d12c2ac9ee7ab143aef01e970 (patch)
tree0de6a55352765746f6a7d72f6d49e44e5692fae0 /Alc
parent13ba253aec2abaccc7c075d2bb5d196b0aae629f (diff)
Make sure the buffer padding is always cleared before looking for the next buffer
Diffstat (limited to 'Alc')
-rw-r--r--Alc/mixer.c3
1 files changed, 1 insertions, 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;