diff options
author | Chris Robinson <[email protected]> | 2011-07-03 18:54:23 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-07-03 19:22:14 -0700 |
commit | 5ba864b6da73ac27c560f5d0242b36d6fdae099e (patch) | |
tree | b39eba33675afe5c6a4a26f27bcdb0e8ea1f007a /Alc/ALu.c | |
parent | 30e97d5223397fcfe6ce203a8cafc6c017088d66 (diff) |
Calculate the wet gain decay time attenuation with linear values
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -600,10 +600,9 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) * calculated and applied to the wet path. */ if(WetGainAuto) - WetGain[i] *= aluPow(10.0f, EffectiveDist / - (SPEEDOFSOUNDMETRESPERSEC * - Slot->effect.Params.Reverb.DecayTime) * - (-60.0/20.0)); + WetGain[i] *= aluPow(0.001f, /* -60dB */ + (1.0f/SPEEDOFSOUNDMETRESPERSEC)*EffectiveDist / + Slot->effect.Params.Reverb.DecayTime); WetGainHF[i] *= aluPow(Slot->effect.Params.Reverb.AirAbsorptionGainHF, AirAbsorptionFactor * EffectiveDist); |