From a77387b5490e8f40c682118c2a1c192cddc06939 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 11 Oct 2014 09:35:32 -0700 Subject: Avoid taking the square-root of the ambient gain Although it is more correct for preserving the apparent volume, the ambisonics- based panning does not work on the same power scale, making it louder by comparison. --- Alc/effects/distortion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Alc/effects/distortion.c') diff --git a/Alc/effects/distortion.c b/Alc/effects/distortion.c index 04a05d99..9e36ea20 100644 --- a/Alc/effects/distortion.c +++ b/Alc/effects/distortion.c @@ -82,7 +82,7 @@ static ALvoid ALdistortionState_update(ALdistortionState *state, ALCdevice *Devi ALfilterState_setParams(&state->bandpass, ALfilterType_BandPass, 1.0f, cutoff / (frequency*4.0f), bandwidth); - gain = sqrtf(1.0f / Device->NumSpeakers) * Slot->Gain; + gain = 1.0f/Device->NumSpeakers * Slot->Gain; SetGains(Device, gain, state->Gain); } -- cgit v1.2.3