diff options
author | Chris Robinson <[email protected]> | 2008-08-05 20:51:30 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-08-05 20:51:30 -0700 |
commit | 453b01522511b6caadad909e9fee6975ea3477cd (patch) | |
tree | c84e2d6b25c0abeab5d4d8467951322bb1fdf9ff /Alc/ALu.c | |
parent | c1cf9ae8f6afdea81f1adc84cde628062ff6c6d9 (diff) |
Prevent a 0 or negative increment for the buffer position
Thanks to Christopher Fitzgerald for pointing these last two problems out
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |