diff options
author | Chris Robinson <[email protected]> | 2011-09-22 01:00:44 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-22 01:00:44 -0700 |
commit | a4b1239f45daa29bb423077da60804d7bf9287eb (patch) | |
tree | 0a9f7025fe1d298f5de58fde0836af9541c3ed01 /Alc/alcReverb.c | |
parent | 43350f9066f0c28ac8ff6269783db222508dec45 (diff) |
Use cosf and sinf when available
Also clear away a few more MSVC precision warnings
Diffstat (limited to 'Alc/alcReverb.c')
-rw-r--r-- | Alc/alcReverb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c index 425b7052..0555db64 100644 --- a/Alc/alcReverb.c +++ b/Alc/alcReverb.c @@ -237,7 +237,7 @@ static __inline ALfloat EAXModulation(ALverbState *State, ALfloat in) // Calculate the sinus rythm (dependent on modulation time and the // sampling rate). The center of the sinus is moved to reduce the delay // of the effect when the time or depth are low. - sinus = 1.0f - cos(2.0f * M_PI * State->Mod.Index / State->Mod.Range); + sinus = 1.0f - aluCos((ALfloat)M_PI*2.0f * State->Mod.Index / State->Mod.Range); // The depth determines the range over which to read the input samples // from, so it must be filtered to reduce the distortion caused by even @@ -764,7 +764,7 @@ static __inline ALfloat CalcDecayLength(ALfloat coeff, ALfloat decayTime) // calculation. static __inline ALfloat CalcI3DL2HFreq(ALfloat hfRef, ALuint frequency) { - return cos(2.0f * M_PI * hfRef / frequency); + return aluCos((ALfloat)M_PI*2.0f * hfRef / frequency); } // Calculate an attenuation to be applied to the input of any echo models to @@ -797,9 +797,9 @@ static __inline ALvoid CalcMatrixCoeffs(ALfloat diffusion, ALfloat *x, ALfloat * t = diffusion * atan(n); // Calculate the first mixing matrix coefficient. - *x = cos(t); + *x = aluCos(t); // Calculate the second mixing matrix coefficient. - *y = sin(t) / n; + *y = aluSin(t) / n; } // Calculate the limited HF ratio for use with the late reverb low-pass |