aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-03 16:18:46 -0700
committerChris Robinson <[email protected]>2011-05-03 16:18:46 -0700
commite2850df07eac6e3c641a3c66ecdc153db12ef788 (patch)
treeea3e551635476e3368ec880c596f704498af6f3c /Alc/ALu.c
parent48def2fecb3e3ff0e8500e3cec3bdc0639580e72 (diff)
Use the same filters for mono sources and multi-channel
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 07eb9315..b4a23f98 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -858,16 +858,11 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
/* Update filter coefficients. */
cw = cos(2.0*M_PI * LOWPASSFREQCUTOFF / Frequency);
- /* Spatialized sources use four chained one-pole filters, so we need to
- * take the fourth root of the squared gain, which is the same as the
- * square root of the base gain. */
- ALSource->Params.iirFilter.coeff = lpCoeffCalc(aluSqrt(DryGainHF), cw);
-
+ ALSource->Params.iirFilter.coeff = lpCoeffCalc(DryGainHF, cw);
for(i = 0;i < NumSends;i++)
{
- /* The wet path uses two chained one-pole filters, so take the
- * base gain (square root of the squared gain) */
- ALSource->Params.Send[i].iirFilter.coeff = lpCoeffCalc(WetGainHF[i], cw);
+ ALfloat a = lpCoeffCalc(WetGainHF[i]*WetGainHF[i], cw);
+ ALSource->Params.Send[i].iirFilter.coeff = a;
}
}