diff options
author | Chris Robinson <[email protected]> | 2009-01-27 07:11:58 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-01-27 07:11:58 -0800 |
commit | cbfc33215b856b922468362126d7a7485d7cdb20 (patch) | |
tree | 5d04947d6c56cb45b0cbf20aa4df5f1fc9e806b4 | |
parent | 5a93b56673ed9831ade46900322ea4494325c504 (diff) |
Use M_PI since it is sure to be defined
-rw-r--r-- | Alc/ALu.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -731,8 +731,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, WetMix = __max(WetMix,MinVolume); //3. Apply directional soundcones - Angle = aluAcos(aluDotproduct(Direction,SourceToListener)) * 180.0f / - 3.141592654f; + Angle = aluAcos(aluDotproduct(Direction,SourceToListener)) * 180.0f/M_PI; if(Angle >= InnerAngle && Angle <= OuterAngle) { ALfloat scale = (Angle-InnerAngle) / (OuterAngle-InnerAngle); @@ -851,7 +850,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, *wetsend = WetMix; // Update filter coefficients. Calculations based on the I3DL2 spec. - cw = cos(2.0f*3.141592654f * LOWPASSFREQCUTOFF / ALContext->Frequency); + cw = cos(2.0*M_PI * LOWPASSFREQCUTOFF / ALContext->Frequency); // We use four chained one-pole filters, so we need to take the fourth // root of the squared gain, which is the same as the square root of // the base gain. @@ -898,7 +897,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, drysend[LFE] = DryMix * ListenerGain; *wetsend = 0.0f; - cw = cos(2.0f*3.141592654f * LOWPASSFREQCUTOFF / ALContext->Frequency); + cw = cos(2.0*M_PI * LOWPASSFREQCUTOFF / ALContext->Frequency); g = __max(DryGainHF, 0.01f); a = 0.0f; if(g < 0.9999f) // 1-epsilon |