diff options
author | Chris Robinson <[email protected]> | 2023-01-18 14:33:48 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-01-18 14:33:48 -0800 |
commit | 3f2e6218955d8848ff0a67112941e680665a37db (patch) | |
tree | 8e322763a518017d0a64686345be6380dc67b1d8 /alc/effects | |
parent | 4171f9460fb7c6f634690d772f67af5d83fbdb64 (diff) |
Use a variable to handle a long value definition
Diffstat (limited to 'alc/effects')
-rw-r--r-- | alc/effects/pshifter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp index c2bf0ebf..8619b334 100644 --- a/alc/effects/pshifter.cpp +++ b/alc/effects/pshifter.cpp @@ -226,8 +226,9 @@ void PshifterState::process(const size_t samplesToDo, const al::span<const Float * accumulating the magnitudes of overlapping frequency bins. */ std::fill(mSynthesisBuffer.begin(), mSynthesisBuffer.end(), FrequencyBin{}); - const size_t bin_count{minz(STFT_HALF_SIZE+1, - (((STFT_HALF_SIZE+1)<<MixerFracBits) - MixerFracHalf - 1)/mPitchShiftI + 1)}; + + constexpr size_t bin_limit{((STFT_HALF_SIZE+1)<<MixerFracBits) - MixerFracHalf - 1}; + const size_t bin_count{minz(STFT_HALF_SIZE+1, bin_limit/mPitchShiftI + 1)}; for(size_t k{0u};k < bin_count;k++) { const size_t j{(k*mPitchShiftI + MixerFracHalf) >> MixerFracBits}; |