aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-18 16:54:22 -0800
committerChris Robinson <[email protected]>2007-12-18 16:54:22 -0800
commit233e6f1765824df7b5d574ea7c9ac590f501ed43 (patch)
tree5af54bc0394187bbb705f2f6e2fb8afb8f3cf550 /Alc
parent9adc20e4e727bb2a9829cf9c9a970358d094b951 (diff)
Implement AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO property
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 170c7210..2d1ef59c 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -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;