aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/autowah.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/autowah.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/autowah.c')
-rw-r--r--Alc/effects/autowah.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/effects/autowah.c b/Alc/effects/autowah.c
index 09474d56..f4aaf49f 100644
--- a/Alc/effects/autowah.c
+++ b/Alc/effects/autowah.c
@@ -31,8 +31,8 @@
/* Auto-wah is simply a low-pass filter with a cutoff frequency that shifts up
* or down depending on the input signal, and a resonant peak at the cutoff.
*
- * Currently, we assume a cutoff frequency range of 500hz (no amplitude) to
- * 3khz (peak gain). Peak gain is assumed to be in normalized scale.
+ * Currently, we assume a cutoff frequency range of 20hz (no amplitude) to
+ * 20khz (peak gain). Peak gain is assumed to be in normalized scale.
*/
typedef struct ALautowahState {
@@ -76,7 +76,7 @@ static ALvoid ALautowahState_update(ALautowahState *state, ALCdevice *device, co
state->PeakGain = slot->EffectProps.Autowah.PeakGain;
state->Resonance = slot->EffectProps.Autowah.Resonance;
- gain = sqrtf(1.0f / device->NumSpeakers) * slot->Gain;
+ gain = 1.0f/device->NumSpeakers * slot->Gain;
SetGains(device, gain, state->Gain);
}