Ensure that LoopEnd > LoopStart

For the benefit of Clang's static analysis, which doesn't know that a
static source will always have a valid buffer and a buffer must have a
non-0 loop range.
This commit is contained in:
Chris Robinson
2014-05-15 01:44:29 -07:00
parent fdcdda2ed3
commit a11e1c0858
+1
View File
@@ -367,6 +367,7 @@ ALvoid MixSource(ALactivesource *src, ALCdevice *Device, ALuint SamplesToDo)
if(Looping && Source->SourceType == AL_STATIC)
{
assert(LoopEnd > LoopStart);
DataPosInt = ((DataPosInt-LoopStart)%(LoopEnd-LoopStart)) + LoopStart;
break;
}