diff options
author | Chris Robinson <[email protected]> | 2014-10-02 18:05:42 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-10-02 18:05:42 -0700 |
commit | 95ba18cf4e52c439b85ece2daf0b404fa69c7b70 (patch) | |
tree | 2367b5d69488633fb8d596cf3e3b328d81b2753f /Alc/effects/chorus.c | |
parent | 9377d0f23730ff0d42a870627ea9a75059c481f4 (diff) |
Make ComputeAngleGains use ComputeDirectionalGains
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; |