aboutsummaryrefslogtreecommitdiffstats
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
parent136caf0cb097943aa4d06aba8205fe6cd90de4b7 (diff)
Avoid unnecessary use of CalcAngleCoeffs
-rw-r--r--Alc/alu.cpp2
-rw-r--r--Alc/effects/chorus.cpp6
-rw-r--r--Alc/effects/dedicated.cpp2
-rw-r--r--Alc/effects/distortion.cpp2
-rw-r--r--Alc/effects/fshifter.cpp2
-rw-r--r--Alc/effects/pshifter.cpp2
6 files changed, 8 insertions, 8 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp
index dd99a9f5..d1e0772a 100644
--- a/Alc/alu.cpp
+++ b/Alc/alu.cpp
@@ -754,7 +754,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat xpos, const ALfloat ypo
* input channels of the source sends.
*/
ALfloat coeffs[MAX_AMBI_CHANNELS];
- CalcAngleCoeffs(az, ev, Spread, coeffs);
+ CalcDirectionCoeffs({xpos, ypos, zpos}, Spread, coeffs);
for(ALsizei i{0};i < NumSends;i++)
{
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;
diff --git a/Alc/effects/dedicated.cpp b/Alc/effects/dedicated.cpp
index 4c528a61..14d0c3c8 100644
--- a/Alc/effects/dedicated.cpp
+++ b/Alc/effects/dedicated.cpp
@@ -81,7 +81,7 @@ void DedicatedState::update(const ALCcontext* UNUSED(context), const ALeffectslo
else
{
ALfloat coeffs[MAX_AMBI_CHANNELS];
- CalcAngleCoeffs(0.0f, 0.0f, 0.0f, coeffs);
+ CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f, coeffs);
mOutBuffer = target.Main->Buffer;
mOutChannels = target.Main->NumChannels;
diff --git a/Alc/effects/distortion.cpp b/Alc/effects/distortion.cpp
index 3639297f..d2bcd018 100644
--- a/Alc/effects/distortion.cpp
+++ b/Alc/effects/distortion.cpp
@@ -90,7 +90,7 @@ void DistortionState::update(const ALCcontext *context, const ALeffectslot *slot
);
ALfloat coeffs[MAX_AMBI_CHANNELS];
- CalcAngleCoeffs(0.0f, 0.0f, 0.0f, coeffs);
+ CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f, coeffs);
mOutBuffer = target.Main->Buffer;
mOutChannels = target.Main->NumChannels;
diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp
index 4587b721..e3dc6f1d 100644
--- a/Alc/effects/fshifter.cpp
+++ b/Alc/effects/fshifter.cpp
@@ -131,7 +131,7 @@ void FshifterState::update(const ALCcontext *context, const ALeffectslot *slot,
}
ALfloat coeffs[MAX_AMBI_CHANNELS];
- CalcAngleCoeffs(0.0f, 0.0f, 0.0f, coeffs);
+ CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f, coeffs);
mOutBuffer = target.Main->Buffer;
mOutChannels = target.Main->NumChannels;
diff --git a/Alc/effects/pshifter.cpp b/Alc/effects/pshifter.cpp
index f95579d7..1d85fb9e 100644
--- a/Alc/effects/pshifter.cpp
+++ b/Alc/effects/pshifter.cpp
@@ -190,7 +190,7 @@ void PshifterState::update(const ALCcontext* UNUSED(context), const ALeffectslot
mPitchShift = mPitchShiftI * (1.0f/FRACTIONONE);
ALfloat coeffs[MAX_AMBI_CHANNELS];
- CalcAngleCoeffs(0.0f, 0.0f, 0.0f, coeffs);
+ CalcDirectionCoeffs({0.0f, 0.0f, -1.0f}, 0.0f, coeffs);
mOutBuffer = target.Main->Buffer;
mOutChannels = target.Main->NumChannels;