From 8348d719cd400be949da457dac86942e3c327c96 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 10 Feb 2009 15:15:49 -0800 Subject: [PATCH] Clamp gain of multichannel sources --- Alc/ALu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Alc/ALu.c b/Alc/ALu.c index 6a93d55c..741b5394 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -878,6 +878,8 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, pitch[0] = ALSource->flPitch; DryMix = SourceVolume; + DryMix = __min(DryMix,MaxVolume); + DryMix = __max(DryMix,MinVolume); switch(ALSource->DirectFilter.type) { -- 2.11.4.GIT