aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-04 20:21:46 -0800
committerChris Robinson <[email protected]>2018-01-04 20:21:46 -0800
commit510bccb6acda071618f18b70137c607a42ba16ff (patch)
treeae7119c3f2b779a67e425c39cdcccebe4fd45102 /Alc
parent32330c5eef72be3c109c9ac7363ea4573c1f21b1 (diff)
Use the correct start point when looping
Diffstat (limited to 'Alc')
-rw-r--r--Alc/mixer.c4
1 files changed, 2 insertions, 2 deletions
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
);
}