aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALu.c')
-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;