aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/modulator.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-10-11 09:35:32 -0700
committerChris Robinson <[email protected]>2014-10-11 09:35:32 -0700
commita77387b5490e8f40c682118c2a1c192cddc06939 (patch)
tree5a6dcf4784f59c7968fc3a7b502bfcb98d1624d3 /Alc/effects/modulator.c
parent79163b075517c88c86c8f63f32669c75f2c66404 (diff)
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.
Diffstat (limited to 'Alc/effects/modulator.c')
-rw-r--r--Alc/effects/modulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/effects/modulator.c b/Alc/effects/modulator.c
index 0665ad6c..e57040b3 100644
--- a/Alc/effects/modulator.c
+++ b/Alc/effects/modulator.c
@@ -149,7 +149,7 @@ static ALvoid ALmodulatorState_update(ALmodulatorState *state, ALCdevice *Device
state->Filter.a[1] = -a;
state->Filter.a[2] = 0.0f;
- gain = sqrtf(1.0f/Device->NumSpeakers) * Slot->Gain;
+ gain = 1.0f/Device->NumSpeakers * Slot->Gain;
SetGains(Device, gain, state->Gain);
}