summaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-11-16 00:57:35 -0800
committerChris Robinson <[email protected]>2008-11-16 00:57:35 -0800
commit181eb95b1385f5fb2afd69eed3bcc697c402148c (patch)
tree384333c20421baca0677754df8dea4bbdd17bcff /Alc/ALu.c
parentc0ccd31a3e5294ffa6f138ff755177cd9bad6a4b (diff)
Use a better dB-to-linear gain convertion
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 1f755621..cb943eca 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -388,7 +388,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource,
absorb = (ALSource->AirAbsorptionFactor*AIRABSORBGAINDBHF) *
(Distance*MetersPerUnit);
// Convert dB to linear gain before applying
- absorb = pow(0.5, absorb/-6.0);
+ absorb = pow(10.0, absorb/20.0);
DryGainHF *= absorb;
WetGainHF *= absorb;
}