diff options
author | Chris Robinson <[email protected]> | 2007-12-18 16:54:22 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-18 16:54:22 -0800 |
commit | 233e6f1765824df7b5d574ea7c9ac590f501ed43 (patch) | |
tree | 5af54bc0394187bbb705f2f6e2fb8afb8f3cf550 /Alc | |
parent | 9adc20e4e727bb2a9829cf9c9a970358d094b951 (diff) |
Implement AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO property
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -225,7 +225,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, InnerAngle = ALSource->flInnerAngle; OuterAngle = ALSource->flOuterAngle; HeadRelative = ALSource->bHeadRelative; - OuterGainHF = (ALSource->DryGainHFAuto ? ALSource->OuterGainHF : 1.0f); + OuterGainHF = ALSource->OuterGainHF; //Set working variables DryMix = (ALfloat)(1.0f); @@ -310,12 +310,18 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, { ALfloat scale = (Angle-InnerAngle) / (OuterAngle-InnerAngle); ConeVolume = (1.0f+(OuterGain-1.0f)*scale); - DryGainHF *= (1.0f+(OuterGainHF-1.0f)*scale); + if(ALSource->DryGainHFAuto) + DryGainHF *= (1.0f+(OuterGainHF-1.0f)*scale); + if(ALSource->WetGainHFAuto) + WetGainHF *= (1.0f+(OuterGainHF-1.0f)*scale); } else if(Angle > OuterAngle) { ConeVolume = (1.0f+(OuterGain-1.0f)); - DryGainHF *= (1.0f+(OuterGainHF-1.0f)); + if(ALSource->DryGainHFAuto) + DryGainHF *= (1.0f+(OuterGainHF-1.0f)); + if(ALSource->WetGainHFAuto) + WetGainHF *= (1.0f+(OuterGainHF-1.0f)); } else ConeVolume = 1.0f; |