aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-01-31 17:06:27 -0800
committerChris Robinson <[email protected]>2022-02-01 04:04:24 -0800
commit1c9f791e4f2c36e1c7077b8241f08368af2e93c4 (patch)
tree3bd109bf3446a5548cdbe3c058d0c241dd2fac17
parent071c9a6758b9c6810b81e60a3524b21684762f15 (diff)
Rename Sqrt1_2 for consistency
-rw-r--r--alc/effects/reverb.cpp10
-rw-r--r--utils/uhjdecoder.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp
index 0b5e4edb..f5818c27 100644
--- a/alc/effects/reverb.cpp
+++ b/alc/effects/reverb.cpp
@@ -112,11 +112,11 @@ alignas(16) constexpr float EarlyA2B[NUM_LINES][NUM_LINES]{
};
/* Converts A-Format to B-Format for late reverb. */
-constexpr auto Sqrt1_2 = static_cast<float>(1.0/al::numbers::sqrt2);
+constexpr auto InvSqrt2 = static_cast<float>(1.0/al::numbers::sqrt2);
alignas(16) constexpr float LateA2B[NUM_LINES][NUM_LINES]{
{ 0.5f, 0.5f, 0.5f, 0.5f },
- { Sqrt1_2, -Sqrt1_2, 0.0f, 0.0f },
- { 0.0f, 0.0f, Sqrt1_2, -Sqrt1_2 },
+ { InvSqrt2, -InvSqrt2, 0.0f, 0.0f },
+ { 0.0f, 0.0f, InvSqrt2, -InvSqrt2 },
{ 0.5f, 0.5f, -0.5f, -0.5f }
};
@@ -795,7 +795,7 @@ void EarlyReflections::updateLines(const float density_mult, const float diffusi
const float decayTime, const float frequency)
{
/* Calculate the all-pass feed-back/forward coefficient. */
- VecAp.Coeff = diffusion*diffusion * Sqrt1_2;
+ VecAp.Coeff = diffusion*diffusion * InvSqrt2;
for(size_t i{0u};i < NUM_LINES;i++)
{
@@ -885,7 +885,7 @@ void LateReverb::updateLines(const float density_mult, const float diffusion,
DensityGain[1] = CalcDensityGain(CalcDecayCoeff(length, decayTimeWeighted));
/* Calculate the all-pass feed-back/forward coefficient. */
- VecAp.Coeff = diffusion*diffusion * Sqrt1_2;
+ VecAp.Coeff = diffusion*diffusion * InvSqrt2;
for(size_t i{0u};i < NUM_LINES;i++)
{
diff --git a/utils/uhjdecoder.cpp b/utils/uhjdecoder.cpp
index cd385e2b..71003015 100644
--- a/utils/uhjdecoder.cpp
+++ b/utils/uhjdecoder.cpp
@@ -502,9 +502,9 @@ int main(int argc, char **argv)
for(size_t i{0};i < got;++i)
{
/* Attenuate by -3dB for FuMa output levels. */
- constexpr auto sqrt1_2 = static_cast<float>(1.0/al::numbers::sqrt2);
+ constexpr auto inv_sqrt2 = static_cast<float>(1.0/al::numbers::sqrt2);
for(size_t j{0};j < outchans;++j)
- outmem[i*outchans + j] = f32AsLEBytes(decmem[j][LeadIn+i] * sqrt1_2);
+ outmem[i*outchans + j] = f32AsLEBytes(decmem[j][LeadIn+i] * inv_sqrt2);
}
LeadIn = 0;