aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-01-30 10:56:25 -0800
committerChris Robinson <[email protected]>2009-01-30 10:56:25 -0800
commit7d7fc39035aa8df2e71e76147d2bec3adb2c9015 (patch)
tree9ce9850aca6652193cf52a506c9641b15e5556b5 /Alc
parent351105b3dff2f1c5d547d86ebefc14a2485c724e (diff)
Use calculated distance from reference for air absorption
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c2
1 files changed, 1 insertions, 1 deletions
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;