summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-11-26 15:51:13 -0800
committerChris Robinson <[email protected]>2010-11-26 15:51:13 -0800
commitd7987677ac5748576626b0ed7f47d2e607bb4e77 (patch)
tree4b7d4614ffe48b5e93c9514a7a10ac4af14a1d14 /Alc
parent5fbbfa482f5720be6078e8e40e591779a513efdc (diff)
Subtract the fractional position separately
Diffstat (limited to 'Alc')
-rw-r--r--Alc/mixer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index b1ad0771..53ba4aca 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -855,8 +855,9 @@ ALvoid MixSource(ALsource *Source, ALCdevice *Device, ALuint SamplesToDo)
DataSize64 -= BufferPadding+BufferPrePadding;
DataSize64 <<= FRACTIONBITS;
DataSize64 -= increment;
+ DataSize64 -= DataPosFrac;
- BufferSize = (ALuint)((DataSize64-DataPosFrac+(increment-1)) / increment);
+ BufferSize = (ALuint)((DataSize64+(increment-1)) / increment);
BufferSize = min(BufferSize, (SamplesToDo-OutPos));
if(BufferSize == 0)
{