aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-06 00:51:12 -0700
committerChris Robinson <[email protected]>2011-05-06 00:51:12 -0700
commitf97eca34df1324a1cf3b8eb71d7c47c409322a56 (patch)
treea7677bde4d8495aa9cf395884e8ef5dd8851f6bf /Alc/ALu.c
parent1363e044acb52e9e51e2b3dcdc6dbad823ccb06c (diff)
Minor source update fixes
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 456f9de8..ccf6e45a 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -648,7 +648,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
}
//3. Apply directional soundcones
- Angle = aluAcos(aluDotproduct(Direction,SourceToListener)) * 180.0/M_PI;
+ Angle = aluAcos(aluDotproduct(Direction,SourceToListener)) * (180.0/M_PI);
if(Angle >= InnerAngle && Angle <= OuterAngle)
{
ALfloat scale = (Angle-InnerAngle) / (OuterAngle-InnerAngle);
@@ -709,7 +709,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
WetGain[i] *= aluPow(10.0f, EffectiveDist /
(SPEEDOFSOUNDMETRESPERSEC *
Slot->effect.Reverb.DecayTime) *
- -60.0 / 20.0);
+ (-60.0/20.0));
WetGainHF[i] *= aluPow(Slot->effect.Reverb.AirAbsorptionGainHF,
AirAbsorptionFactor * EffectiveDist);
@@ -836,7 +836,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
for(s = 0;s < (ALsizei)Device->NumChan;s++)
{
Channel chan = Device->Speaker2Chan[s];
- ALfloat gain = AmbientGain + (SpeakerGain[chan]-AmbientGain)*DirGain;
+ ALfloat gain = lerp(AmbientGain, SpeakerGain[chan], DirGain);
ALSource->Params.DryGains[0][chan] = DryGain * gain;
}
}