Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix loading mono resampled files in convolution reverb
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Jul 5, 2023
1 parent d85939a commit e5d08cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/ConvolutionReverb/OneKnobPlugin.cpp
Expand Up @@ -312,15 +312,17 @@ class OneKnobConvolutionReverbPlugin : public OneKnobPlugin
// left channel, always present
float* const irBufResampledL = new float[numResampledFrames];
resampler.oneshot(irBufL, numFrames, irBufResampledL, numResampledFrames);
delete[] irBufL;
if (irBufL != ir)
delete[] irBufL;
irBufL = irBufResampledL;

// right channel, optional
if (irBufL != irBufR)
{
float* const irBufResampledR = new float[numResampledFrames];
resampler.oneshot(irBufR, numFrames, irBufResampledR, numResampledFrames);
delete[] irBufR;
if (irBufR != ir)
delete[] irBufR;
irBufR = irBufResampledR;
}

Expand Down

0 comments on commit e5d08cf

Please sign in to comment.