aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcModulator.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-22 11:17:01 -0700
committerChris Robinson <[email protected]>2011-09-22 11:17:01 -0700
commit470b506952c83580cfae5c3dc94a3b359c900dea (patch)
tree149d982293f816d6bf240f0491013573449f8f3d /Alc/alcModulator.c
parentde8a447ea50aba854df956716c6abdd846916d5f (diff)
Use macros for float-typed PI values, to avoid manual casts everywhere
Diffstat (limited to 'Alc/alcModulator.c')
-rw-r--r--Alc/alcModulator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/alcModulator.c b/Alc/alcModulator.c
index e6f94737..4c1bd2f7 100644
--- a/Alc/alcModulator.c
+++ b/Alc/alcModulator.c
@@ -54,7 +54,7 @@ typedef struct ALmodulatorState {
static __inline ALfloat Sin(ALuint index)
{
- return aluSin(index * ((ALfloat)M_PI*2.0f / (1<<WAVEFORM_FRACBITS)));
+ return aluSin(index * (F_PI*2.0f / (1<<WAVEFORM_FRACBITS)));
}
static __inline ALfloat Saw(ALuint index)
@@ -151,8 +151,8 @@ static ALvoid ModulatorUpdate(ALeffectState *effect, ALCcontext *Context, const
if(!state->step)
state->step = 1;
- cw = aluCos((ALfloat)M_PI*2.0f * Slot->effect.Modulator.HighPassCutoff /
- Device->Frequency);
+ cw = aluCos(F_PI*2.0f * Slot->effect.Modulator.HighPassCutoff /
+ Device->Frequency);
a = (2.0f-cw) - aluSqrt(aluPow(2.0f-cw, 2.0f) - 1.0f);
state->iirFilter.coeff = a;