aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-18 13:37:07 -0800
committerChris Robinson <[email protected]>2007-12-18 13:37:07 -0800
commitebb30ec5b0e219fdf2b21fbfdd1be6e17cb31376 (patch)
tree75ec156208d2caf3cd0395e437dd8332a66ae8d3 /Alc/ALu.c
parent168d8e3beee5f809f79f6d0067cd51e25ba65295 (diff)
Implement AL_AIR_ABSORPTION_FACTOR source property
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 7397af8f..b65070a8 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -378,6 +378,10 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource,
break;
}
+ if(ALSource->AirAbsorptionFactor > 0.0f)
+ DryGainHF *= pow(ALSource->AirAbsorptionFactor * AIRABSORBGAINHF,
+ Distance * MetersPerUnit);
+
*drygainhf = DryGainHF;
*wetgainhf = WetGainHF;