diff options
author | Chris Robinson <[email protected]> | 2008-07-23 23:27:38 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-07-23 23:27:38 -0700 |
commit | c3a74809615dbe8bdaa938b9e963e8bb65427a0e (patch) | |
tree | f47796f9b28e81f018b8888196ac0d2c1c76b137 /Alc | |
parent | a75e75aef5f62ca282db8c0a0aa9d1c25551eae7 (diff) |
Don't advertise extra samples for mixing
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -674,13 +674,12 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma increment = (MAX_PITCH<<FRACTIONBITS); //Figure out how many samples we can mix. - //Pitch must be <= 4 (the number below !) - DataSize64 = DataSize+MAX_PITCH; + DataSize64 = DataSize; DataSize64 <<= FRACTIONBITS; DataPos64 = DataPosInt; DataPos64 <<= FRACTIONBITS; DataPos64 += DataPosFrac; - BufferSize = (ALuint)((DataSize64-DataPos64) / increment); + BufferSize = (ALuint)((DataSize64-DataPos64+(increment-1)) / increment); BufferListItem = ALSource->queue; for(loop = 0; loop < ALSource->BuffersPlayed; loop++) { |