diff options
author | Chris Robinson <[email protected]> | 2011-05-03 16:18:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-05-03 16:18:46 -0700 |
commit | e2850df07eac6e3c641a3c66ecdc153db12ef788 (patch) | |
tree | ea3e551635476e3368ec880c596f704498af6f3c /Alc/ALu.c | |
parent | 48def2fecb3e3ff0e8500e3cec3bdc0639580e72 (diff) |
Use the same filters for mono sources and multi-channel
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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; } } |