Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Really fix loading small IR files
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Jul 10, 2023
1 parent e5d08cf commit 11b3dff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 3rd-party/FFTConvolver
16 changes: 10 additions & 6 deletions plugins/ConvolutionReverb/TwoStageThreadedConvolver.hpp
Expand Up @@ -53,17 +53,21 @@ class TwoStageThreadedConvolver : public fftconvolver::TwoStageFFTConvolver,

bool init(const fftconvolver::Sample* const ir, const size_t irLen)
{
if (irLen > kTailBlockSize * 2)
if (fftconvolver::TwoStageFFTConvolver::init(kHeadBlockSize, kTailBlockSize, ir, irLen))
{
if (! fftconvolver::TwoStageFFTConvolver::init(kHeadBlockSize, kTailBlockSize, ir, irLen))
return false;

startThread(true);
return true;
}

nonThreadedConvolver = new fftconvolver::FFTConvolver();
return nonThreadedConvolver->init(kHeadBlockSize, ir, irLen);
ScopedPointer<fftconvolver::FFTConvolver> conv(new fftconvolver::FFTConvolver);

if (conv->init(kHeadBlockSize, ir, irLen))
{
nonThreadedConvolver = conv.release();
return true;
}

return false;
}

void process(const fftconvolver::Sample* const input, fftconvolver::Sample* const output, const size_t len)
Expand Down

0 comments on commit 11b3dff

Please sign in to comment.