aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alu.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-25 10:06:17 -0800
committerChris Robinson <[email protected]>2018-12-25 10:06:17 -0800
commit9e19acd9e1bf4627d99a0ef87757da4c227ef2db (patch)
tree0c970b441e993f91310991a2fa45d752036c4425 /Alc/alu.cpp
parent63df7cd537bd43fb2548a112b051a1790ff1140e (diff)
Avoid making static local copies of constexpr values
Diffstat (limited to 'Alc/alu.cpp')
-rw-r--r--Alc/alu.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp
index abe938f1..cad1a9e6 100644
--- a/Alc/alu.cpp
+++ b/Alc/alu.cpp
@@ -642,14 +642,14 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev
Elev, Spread, coeffs);
/* NOTE: W needs to be scaled due to FuMa normalization. */
- ComputePanGains(&Device->FOAOut, coeffs, DryGain*AmbiScale::FromFuMa[0],
+ const ALfloat &scale0 = AmbiScale::FromFuMa[0];
+ ComputePanGains(&Device->FOAOut, coeffs, DryGain*scale0,
voice->Direct.Params[0].Gains.Target);
for(ALsizei i{0};i < NumSends;i++)
{
if(const ALeffectslot *Slot{SendSlots[i]})
ComputePanningGainsBF(Slot->ChanMap, Slot->NumChannels, coeffs,
- WetGain[i]*AmbiScale::FromFuMa[0], voice->Send[i].Params[0].Gains.Target
- );
+ WetGain[i]*scale0, voice->Send[i].Params[0].Gains.Target);
}
}
else
@@ -692,10 +692,10 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev
* matrix is transposed, for the inputs to align on the rows and
* outputs on the columns.
*/
- static const ALfloat scale0{AmbiScale::FromFuMa[0]};
- static const ALfloat scale1{AmbiScale::FromFuMa[1]};
- static const ALfloat scale2{AmbiScale::FromFuMa[2]};
- static const ALfloat scale3{AmbiScale::FromFuMa[3]};
+ const ALfloat &scale0 = AmbiScale::FromFuMa[0];
+ const ALfloat &scale1 = AmbiScale::FromFuMa[1];
+ const ALfloat &scale2 = AmbiScale::FromFuMa[2];
+ const ALfloat &scale3 = AmbiScale::FromFuMa[3];
const alu::Matrix matrix{
// ACN0 ACN1 ACN2 ACN3
scale0, 0.0f, 0.0f, 0.0f, // Ambi W