diff options
author | Chris Robinson <[email protected]> | 2020-11-09 08:10:43 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-11-09 08:10:43 -0800 |
commit | 3a58bac7bd4e0baa2a24169703c8cb7e6fc49e8f (patch) | |
tree | 9c55c14595a41075c3f98ddae00d3940f5c2c5a9 | |
parent | 54e4346f50780f5e80d294b2270e229952521cc5 (diff) |
Fix pitch shifter bin count
-rw-r--r-- | alc/effects/pshifter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp index 8a525cf1..e9d188d3 100644 --- a/alc/effects/pshifter.cpp +++ b/alc/effects/pshifter.cpp @@ -207,7 +207,7 @@ 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))/mPitchShiftI)}; + (((STFT_HALF_SIZE+1)<<MixerFracBits) - (MixerFracOne>>1) - 1)/mPitchShiftI + 1)}; for(size_t k{0u};k < bin_count;k++) { const size_t j{(k*mPitchShiftI + (MixerFracOne>>1)) >> MixerFracBits}; |