aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/mixer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index e6cab3be..a7882c23 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -424,6 +424,11 @@ ALvoid MixSource(ALsource *Source, ALCdevice *Device, ALuint SamplesToDo)
BufferSize = (ALuint)((DataSize64+(increment-1)) / increment);
BufferSize = minu(BufferSize, (SamplesToDo-OutPos));
+ /* Some mixers like having a multiple of 4, so try to give that unless
+ * this is the last update. */
+ if(OutPos+BufferSize < SamplesToDo)
+ BufferSize &= ~3;
+
SrcData += BufferPrePadding*NumChannels;
for(i = 0;i < NumChannels;i++)
{