diff options
author | Chris Robinson <[email protected]> | 2014-10-11 09:35:32 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-10-11 09:35:32 -0700 |
commit | a77387b5490e8f40c682118c2a1c192cddc06939 (patch) | |
tree | 5a6dcf4784f59c7968fc3a7b502bfcb98d1624d3 /Alc/effects/equalizer.c | |
parent | 79163b075517c88c86c8f63f32669c75f2c66404 (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/equalizer.c')
-rw-r--r-- | Alc/effects/equalizer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/effects/equalizer.c b/Alc/effects/equalizer.c index 5677426d..d04f36ee 100644 --- a/Alc/effects/equalizer.c +++ b/Alc/effects/equalizer.c @@ -93,7 +93,7 @@ static ALboolean ALequalizerState_deviceUpdate(ALequalizerState *UNUSED(state), static ALvoid ALequalizerState_update(ALequalizerState *state, ALCdevice *device, const ALeffectslot *slot) { ALfloat frequency = (ALfloat)device->Frequency; - ALfloat gain = sqrtf(1.0f / device->NumSpeakers) * slot->Gain; + ALfloat gain = 1.0f/device->NumSpeakers * slot->Gain; SetGains(device, gain, state->Gain); |