aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-05-22 16:36:41 -0700
committerChris Robinson <[email protected]>2020-05-22 16:36:41 -0700
commit1a287f434a0931e9fed3fff2d252e62c08f8f4e1 (patch)
tree6c55e7cc0c0d45067bdff7a9aa78bd61a4fc6979 /alc/effects
parent978f32acf70c979a646e1f98ac12aea4288a41e0 (diff)
Round the pitch shifter frequency bin targets
Diffstat (limited to 'alc/effects')
-rw-r--r--alc/effects/pshifter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp
index a91fd2fb..18be0e38 100644
--- a/alc/effects/pshifter.cpp
+++ b/alc/effects/pshifter.cpp
@@ -206,7 +206,7 @@ void PshifterState::process(const size_t samplesToDo, const al::span<const Float
std::fill(mSynthesisBuffer.begin(), mSynthesisBuffer.end(), FrequencyBin{});
for(size_t k{0u};k < STFT_HALF_SIZE+1;k++)
{
- size_t j{(k*mPitchShiftI) >> FRACTIONBITS};
+ const size_t j{(k*mPitchShiftI + (FRACTIONONE>>1)) >> FRACTIONBITS};
if(j >= STFT_HALF_SIZE+1) break;
mSynthesisBuffer[j].Amplitude += mAnalysisBuffer[k].Amplitude;