diff options
author | Chris Robinson <[email protected]> | 2011-05-06 00:51:12 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-05-06 00:51:12 -0700 |
commit | f97eca34df1324a1cf3b8eb71d7c47c409322a56 (patch) | |
tree | a7677bde4d8495aa9cf395884e8ef5dd8851f6bf /Alc/ALu.c | |
parent | 1363e044acb52e9e51e2b3dcdc6dbad823ccb06c (diff) |
Minor source update fixes
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } } |