diff options
Diffstat (limited to 'Alc/effects/chorus.c')
-rw-r--r-- | Alc/effects/chorus.c | 7 |
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; } |