aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/chorus.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-05-20 21:16:13 -0700
committerChris Robinson <[email protected]>2019-05-20 21:16:13 -0700
commit6dbd488d13d455f4538595cb5b30788048a6d20a (patch)
tree66104786541599ccbbcbe757a7195ae8efaaf980 /Alc/effects/chorus.cpp
parent136caf0cb097943aa4d06aba8205fe6cd90de4b7 (diff)
Avoid unnecessary use of CalcAngleCoeffs
Diffstat (limited to 'Alc/effects/chorus.cpp')
-rw-r--r--Alc/effects/chorus.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/effects/chorus.cpp b/Alc/effects/chorus.cpp
index 98f01fa7..74b46a10 100644
--- a/Alc/effects/chorus.cpp
+++ b/Alc/effects/chorus.cpp
@@ -139,7 +139,7 @@ void ChorusState::update(const ALCcontext *Context, const ALeffectslot *Slot, co
* delay and depth to allow enough padding for resampling.
*/
const ALCdevice *device{Context->Device};
- auto frequency = static_cast<ALfloat>(device->Frequency);
+ const auto frequency = static_cast<ALfloat>(device->Frequency);
mDelay = maxi(float2int(props->Chorus.Delay*frequency*FRACTIONONE + 0.5f), mindelay);
mDepth = minf(props->Chorus.Depth * mDelay, static_cast<ALfloat>(mDelay - mindelay));
@@ -147,8 +147,8 @@ void ChorusState::update(const ALCcontext *Context, const ALeffectslot *Slot, co
/* Gains for left and right sides */
ALfloat coeffs[2][MAX_AMBI_CHANNELS];
- CalcAngleCoeffs(al::MathDefs<float>::Pi()*-0.5f, 0.0f, 0.0f, coeffs[0]);
- CalcAngleCoeffs(al::MathDefs<float>::Pi()* 0.5f, 0.0f, 0.0f, coeffs[1]);
+ CalcDirectionCoeffs({-1.0f, 0.0f, 0.0f}, 0.0f, coeffs[0]);
+ CalcDirectionCoeffs({ 1.0f, 0.0f, 0.0f}, 0.0f, coeffs[1]);
mOutBuffer = target.Main->Buffer;
mOutChannels = target.Main->NumChannels;