aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
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++)
{