From 1564cfe48f681a75521b32dc908773caf4e8b79b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 9 Feb 2023 15:05:10 -0800 Subject: Rename some variables for consistency --- core/mixer/mixer_c.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'core/mixer/mixer_c.cpp') 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(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(frac & (BsincPhaseDiffOne-1)) * (1.0f/BsincPhaseDiffOne)}; + const uint pi{frac >> BsincPhaseDiffBits}; + const float pf{static_cast(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(frac & (BsincPhaseDiffOne-1)) * (1.0f/BsincPhaseDiffOne)}; + const uint pi{frac >> BsincPhaseDiffBits}; + const float pf{static_cast(frac&BsincPhaseDiffMask) * (1.0f/BsincPhaseDiffOne)}; const float *RESTRICT fil{istate.bsinc.filter + m*pi*2}; const float *RESTRICT phd{fil + m}; -- cgit v1.2.3