Prevent a 0 or negative increment for the buffer position

Thanks to Christopher Fitzgerald for pointing these last two problems out
This commit is contained in:
Chris Robinson 2008-08-05 20:51:30 -07:00
parent c1cf9ae8f6
commit 453b015225

View File

@ -709,6 +709,8 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma
increment = (ALint)(Pitch*(ALfloat)(1L<<FRACTIONBITS));
if(increment > (MAX_PITCH<<FRACTIONBITS))
increment = (MAX_PITCH<<FRACTIONBITS);
else if(increment <= 0)
increment = (1<<FRACTIONBITS);
//Figure out how many samples we can mix.
DataSize64 = DataSize;