diff options
Diffstat (limited to 'Alc/effects/chorus.c')
-rw-r--r-- | Alc/effects/chorus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/effects/chorus.c b/Alc/effects/chorus.c index ad45c785..6e541208 100644 --- a/Alc/effects/chorus.c +++ b/Alc/effects/chorus.c @@ -93,6 +93,8 @@ static ALboolean ALchorusState_deviceUpdate(ALchorusState *state, ALCdevice *Dev static ALvoid ALchorusState_update(ALchorusState *state, ALCdevice *Device, const ALeffectslot *Slot) { + static const ALfloat left_dir[3] = { -1.0f, 0.0f, 0.0f }; + static const ALfloat right_dir[3] = { 1.0f, 0.0f, 0.0f }; ALfloat frequency = (ALfloat)Device->Frequency; ALfloat rate; ALint phase; @@ -111,8 +113,8 @@ static ALvoid ALchorusState_update(ALchorusState *state, ALCdevice *Device, cons state->delay = fastf2i(Slot->EffectProps.Chorus.Delay * frequency); /* Gains for left and right sides */ - ComputeAngleGains(Device, atan2f(-1.0f, 0.0f), 0.0f, Slot->Gain, state->Gain[0]); - ComputeAngleGains(Device, atan2f(+1.0f, 0.0f), 0.0f, Slot->Gain, state->Gain[1]); + ComputeDirectionalGains(Device, left_dir, Slot->Gain, state->Gain[0]); + ComputeDirectionalGains(Device, right_dir, Slot->Gain, state->Gain[1]); phase = Slot->EffectProps.Chorus.Phase; rate = Slot->EffectProps.Chorus.Rate; |