diff options
author | Chris Robinson <[email protected]> | 2018-01-04 20:21:46 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-04 20:21:46 -0800 |
commit | 510bccb6acda071618f18b70137c607a42ba16ff (patch) | |
tree | ae7119c3f2b779a67e425c39cdcccebe4fd45102 /Alc | |
parent | 32330c5eef72be3c109c9ac7363ea4573c1f21b1 (diff) |
Use the correct start point when looping
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/mixer.c | 4 |
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 ); } |