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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user