aboutsummaryrefslogtreecommitdiffstats
path: root/core/mixer/mixer_c.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-02-09 15:05:10 -0800
committerChris Robinson <[email protected]>2023-02-09 15:05:10 -0800
commit1564cfe48f681a75521b32dc908773caf4e8b79b (patch)
treebe0ca602693b62db8e0c8803845fe8a2d701c3f6 /core/mixer/mixer_c.cpp
parentcf8c599ca0d5e5805da4d9f451b204c02370283e (diff)
Rename some variables for consistency
Diffstat (limited to 'core/mixer/mixer_c.cpp')
-rw-r--r--core/mixer/mixer_c.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/core/mixer/mixer_c.cpp b/core/mixer/mixer_c.cpp
index f74ecff5..dc5045a8 100644
--- a/core/mixer/mixer_c.cpp
+++ b/core/mixer/mixer_c.cpp
@@ -21,11 +21,12 @@ struct FastBSincTag;
namespace {
-constexpr uint BsincPhaseBitDiff{MixerFracBits - BSincPhaseBits};
-constexpr uint BsincPhaseDiffOne{1 << BsincPhaseBitDiff};
+constexpr uint BsincPhaseDiffBits{MixerFracBits - BSincPhaseBits};
+constexpr uint BsincPhaseDiffOne{1 << BsincPhaseDiffBits};
+constexpr uint BsincPhaseDiffMask{BsincPhaseDiffOne - 1u};
-constexpr uint CubicPhaseBitDiff{MixerFracBits - CubicPhaseBits};
-constexpr uint CubicPhaseDiffOne{1 << CubicPhaseBitDiff};
+constexpr uint CubicPhaseDiffBits{MixerFracBits - CubicPhaseBits};
+constexpr uint CubicPhaseDiffOne{1 << CubicPhaseDiffBits};
constexpr uint CubicPhaseDiffMask{CubicPhaseDiffOne - 1u};
inline float do_point(const InterpState&, const float *RESTRICT vals, const uint)
@@ -35,7 +36,7 @@ inline float do_lerp(const InterpState&, const float *RESTRICT vals, const uint
inline float do_cubic(const InterpState &istate, const float *RESTRICT vals, const uint frac)
{
/* Calculate the phase index and factor. */
- const uint pi{frac >> CubicPhaseBitDiff};
+ const uint pi{frac >> CubicPhaseDiffBits};
const float pf{static_cast<float>(frac&CubicPhaseDiffMask) * (1.0f/CubicPhaseDiffOne)};
const float *RESTRICT fil{al::assume_aligned<16>(istate.cubic.filter[pi].mCoeffs)};
@@ -51,8 +52,8 @@ inline float do_bsinc(const InterpState &istate, const float *RESTRICT vals, con
ASSUME(m > 0);
/* Calculate the phase index and factor. */
- const uint pi{frac >> BsincPhaseBitDiff};
- const float pf{static_cast<float>(frac & (BsincPhaseDiffOne-1)) * (1.0f/BsincPhaseDiffOne)};
+ const uint pi{frac >> BsincPhaseDiffBits};
+ const float pf{static_cast<float>(frac&BsincPhaseDiffMask) * (1.0f/BsincPhaseDiffOne)};
const float *RESTRICT fil{istate.bsinc.filter + m*pi*2};
const float *RESTRICT phd{fil + m};
@@ -71,8 +72,8 @@ inline float do_fastbsinc(const InterpState &istate, const float *RESTRICT vals,
ASSUME(m > 0);
/* Calculate the phase index and factor. */
- const uint pi{frac >> BsincPhaseBitDiff};
- const float pf{static_cast<float>(frac & (BsincPhaseDiffOne-1)) * (1.0f/BsincPhaseDiffOne)};
+ const uint pi{frac >> BsincPhaseDiffBits};
+ const float pf{static_cast<float>(frac&BsincPhaseDiffMask) * (1.0f/BsincPhaseDiffOne)};
const float *RESTRICT fil{istate.bsinc.filter + m*pi*2};
const float *RESTRICT phd{fil + m};