aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/chorus.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-08 16:31:23 -0700
committerChris Robinson <[email protected]>2013-10-08 16:31:23 -0700
commita421e515befd1916d57e7668ee98c1a5dfe63dab (patch)
tree68d69e41030ccfec34ac89175edec66e99b7660b /Alc/effects/chorus.c
parent11365b42c7fedaef61d7123c390c429260eae52f (diff)
Use a helper macro for pi*2
Diffstat (limited to 'Alc/effects/chorus.c')
-rw-r--r--Alc/effects/chorus.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Alc/effects/chorus.c b/Alc/effects/chorus.c
index 9e74f8c8..4dbfc93d 100644
--- a/Alc/effects/chorus.c
+++ b/Alc/effects/chorus.c
@@ -122,7 +122,7 @@ static ALvoid ALchorusState_update(ALchorusState *state, ALCdevice *Device, cons
if(rate == 0.0f)
state->lfo_coeff = 0.0f;
else
- state->lfo_coeff = F_PI*2.0f / (frequency / rate);
+ state->lfo_coeff = F_2PI / (frequency / rate);
break;
}
@@ -152,12 +152,11 @@ static inline void Sinusoid(ALint *delay_left, ALint *delay_right, ALint offset,
{
ALfloat lfo_value;
- lfo_value = 1.0f + sinf(fmodf(state->lfo_coeff*offset, 2.0f*F_PI));
+ lfo_value = 1.0f + sinf(fmodf(state->lfo_coeff*offset, F_2PI));
lfo_value *= state->depth * state->delay;
*delay_left = fastf2i(lfo_value) + state->delay;
- lfo_value = 1.0f + sinf(fmodf(state->lfo_coeff*(offset+state->lfo_disp),
- 2.0f*F_PI));
+ lfo_value = 1.0f + sinf(fmodf(state->lfo_coeff*(offset+state->lfo_disp), F_2PI));
lfo_value *= state->depth * state->delay;
*delay_right = fastf2i(lfo_value) + state->delay;
}