From 7d7fc39035aa8df2e71e76147d2bec3adb2c9015 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 30 Jan 2009 10:56:25 -0800 Subject: [PATCH] Use calculated distance from reference for air absorption --- Alc/ALu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alc/ALu.c b/Alc/ALu.c index d3fdf999..7dea43e9 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -714,7 +714,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, if(dist < 0.0f) dist = 0.0f; // Absorption calculation is done in dB absorb = (ALSource->AirAbsorptionFactor*AIRABSORBGAINDBHF) * - (Distance*MetersPerUnit); + (dist*MetersPerUnit); // Convert dB to linear gain before applying absorb = pow(10.0, absorb/20.0); DryGainHF *= absorb;