Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

Commit e5d08cf

Browse files
committed
Fix loading mono resampled files in convolution reverb
Signed-off-by: falkTX <falktx@falktx.com>
1 parent d85939a commit e5d08cf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

plugins/ConvolutionReverb/OneKnobPlugin.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,17 @@ class OneKnobConvolutionReverbPlugin : public OneKnobPlugin
312312
// left channel, always present
313313
float* const irBufResampledL = new float[numResampledFrames];
314314
resampler.oneshot(irBufL, numFrames, irBufResampledL, numResampledFrames);
315-
delete[] irBufL;
315+
if (irBufL != ir)
316+
delete[] irBufL;
316317
irBufL = irBufResampledL;
317318

318319
// right channel, optional
319320
if (irBufL != irBufR)
320321
{
321322
float* const irBufResampledR = new float[numResampledFrames];
322323
resampler.oneshot(irBufR, numFrames, irBufResampledR, numResampledFrames);
323-
delete[] irBufR;
324+
if (irBufR != ir)
325+
delete[] irBufR;
324326
irBufR = irBufResampledR;
325327
}
326328

0 commit comments

Comments
 (0)