diff options
author | Chris Robinson <[email protected]> | 2009-01-30 10:56:25 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-01-30 10:56:25 -0800 |
commit | 7d7fc39035aa8df2e71e76147d2bec3adb2c9015 (patch) | |
tree | 9ce9850aca6652193cf52a506c9641b15e5556b5 | |
parent | 351105b3dff2f1c5d547d86ebefc14a2485c724e (diff) |
Use calculated distance from reference for air absorption
-rw-r--r-- | Alc/ALu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |