aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-07-23 23:27:38 -0700
committerChris Robinson <[email protected]>2008-07-23 23:27:38 -0700
commitc3a74809615dbe8bdaa938b9e963e8bb65427a0e (patch)
treef47796f9b28e81f018b8888196ac0d2c1c76b137 /Alc
parenta75e75aef5f62ca282db8c0a0aa9d1c25551eae7 (diff)
Don't advertise extra samples for mixing
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 0895842f..fe3b9898 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -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++)
{