aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-08-28 23:08:44 -0700
committerChris Robinson <[email protected]>2020-08-28 23:08:44 -0700
commit3fdee6c814d51bc0d78a0be8bc68d4803e51c702 (patch)
treef4904e3b05c456ce67e6c1c4e4125b75bd87a871 /alc/effects
parentecfb0d4f5b6408c6def696e73babc42ce61470f7 (diff)
Calculate the correct number of convolution segments
Diffstat (limited to 'alc/effects')
-rw-r--r--alc/effects/convolution.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp
index 68becf49..9d8f9767 100644
--- a/alc/effects/convolution.cpp
+++ b/alc/effects/convolution.cpp
@@ -223,7 +223,7 @@ EffectBufferBase *ConvolutionState::createBuffer(const ALCdevice *device,
/* Calculate the number of segments needed to hold the impulse response and
* the input history (rounded up), and allocate them.
*/
- filter->mNumConvolveSegs = (buffer.mSampleLen+(ConvolveUpdateSamples-1)) /
+ filter->mNumConvolveSegs = (resampledCount+(ConvolveUpdateSamples-1)) /
ConvolveUpdateSamples;
const size_t complex_length{filter->mNumConvolveSegs * m * (numChannels+1)};