From 510bccb6acda071618f18b70137c607a42ba16ff Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 4 Jan 2018 20:21:46 -0800 Subject: Use the correct start point when looping --- Alc/mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Alc/mixer.c') diff --git a/Alc/mixer.c b/Alc/mixer.c index 5e5ba760..34c4563c 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -437,11 +437,11 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei if(DataPosInt >= buffer->SampleLen) continue; - DataSize = mini(SizeToDo, buffer->SampleLen - DataPosInt); + DataSize = mini(SizeToDo, buffer->SampleLen - LoopStart); CompLen = maxi(CompLen, DataSize); LoadSamples(&SrcData[FilledAmt], - &Data[(DataPosInt*NumChannels + chan)*SampleSize], + &Data[(LoopStart*NumChannels + chan)*SampleSize], NumChannels, buffer->FmtType, DataSize ); } -- cgit v1.2.3