From 4ee95dc296e0aea86d4cd091d6b9c47912760da1 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 5 Dec 2020 14:18:19 -0800 Subject: [PATCH] Use a smaller FFT for convolution --- alc/effects/convolution.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp index 733a0a27..8914835a 100644 --- a/alc/effects/convolution.cpp +++ b/alc/effects/convolution.cpp @@ -102,7 +102,7 @@ struct ChanMap { using complex_d = std::complex; -constexpr size_t ConvolveUpdateSize{1024}; +constexpr size_t ConvolveUpdateSize{256}; constexpr size_t ConvolveUpdateSamples{ConvolveUpdateSize / 2}; @@ -513,8 +513,8 @@ void ConvolutionState::process(const size_t samplesToDo, for(size_t i{m};i < ConvolveUpdateSize;++i) mFftBuffer[i] = std::conj(mFftBuffer[ConvolveUpdateSize-i]); - /* Apply iFFT to get the 1024 (really 1023) samples for output. The - * 512 output samples are combined with the last output's 511 + /* Apply iFFT to get the 256 (really 255) samples for output. The + * 128 output samples are combined with the last output's 127 * second-half samples (and this output's second half is * subsequently saved for next time). */