aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/pshifter.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-01-17 21:56:29 -0800
committerChris Robinson <[email protected]>2023-01-17 21:56:29 -0800
commit4171f9460fb7c6f634690d772f67af5d83fbdb64 (patch)
treef460d0e9f8c49f138d961467627e8092164e937f /alc/effects/pshifter.cpp
parentc5d42ceb107fafd0583c49aedc1c63f3beb35663 (diff)
Make a variable for a reused value
Diffstat (limited to 'alc/effects/pshifter.cpp')
-rw-r--r--alc/effects/pshifter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp
index f0a4c1dd..c2bf0ebf 100644
--- a/alc/effects/pshifter.cpp
+++ b/alc/effects/pshifter.cpp
@@ -227,10 +227,10 @@ void PshifterState::process(const size_t samplesToDo, const al::span<const Float
*/
std::fill(mSynthesisBuffer.begin(), mSynthesisBuffer.end(), FrequencyBin{});
const size_t bin_count{minz(STFT_HALF_SIZE+1,
- (((STFT_HALF_SIZE+1)<<MixerFracBits) - (MixerFracOne>>1) - 1)/mPitchShiftI + 1)};
+ (((STFT_HALF_SIZE+1)<<MixerFracBits) - MixerFracHalf - 1)/mPitchShiftI + 1)};
for(size_t k{0u};k < bin_count;k++)
{
- const size_t j{(k*mPitchShiftI + (MixerFracOne>>1)) >> MixerFracBits};
+ const size_t j{(k*mPitchShiftI + MixerFracHalf) >> MixerFracBits};
/* If more than two bins end up together, use the target frequency
* bin for the one with the dominant magnitude. There might be a