aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-02-10 15:15:49 -0800
committerChris Robinson <[email protected]>2009-02-10 15:15:49 -0800
commit8348d719cd400be949da457dac86942e3c327c96 (patch)
treeaf7f7d9b369cf8ad6298dac08a2b41e7821524f5 /Alc/ALu.c
parent0fcefd865bfe17ba184fae7534adc168b93ea0bc (diff)
Clamp gain of multichannel sources
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c2
1 files changed, 2 insertions, 0 deletions
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)
{