aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-03 18:54:23 -0700
committerChris Robinson <[email protected]>2011-07-03 19:22:14 -0700
commit5ba864b6da73ac27c560f5d0242b36d6fdae099e (patch)
treeb39eba33675afe5c6a4a26f27bcdb0e8ea1f007a /Alc/ALu.c
parent30e97d5223397fcfe6ce203a8cafc6c017088d66 (diff)
Calculate the wet gain decay time attenuation with linear values
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 80fdb7db..a980dc73 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -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);