Hi,
I’m working on dsp::Convolution and I want to use a pre-defined vector of float for testing. All codes are inside the prepareToPlay function.
convBuffer.setSize(1, 300);
/* assign values to convBuffer... */
conv.reset();
conv.prepare(spec);
conv.loadImpulseResponse(
&convBuffer,
spec.sampleRate,
dsp::Convolution::Stereo::yes,
dsp::Convolution::Trim::no,
0,
dsp::Convolution::Normalise::no);
However, I got the jassert error.
void ResamplingAudioSource::setResamplingRatio (const double
samplesInPerOutputSample)
{
jassert (samplesInPerOutputSample > 0); // comes from here...
const SpinLock::ScopedLockType sl (ratioLock);
ratio = jmax (0.0, samplesInPerOutputSample);
}
I also read the doc.
https://docs.juce.com/master/classdsp_1_1Convolution.html#add9aaabf3c0211a00f7533dd3951069f
But still have no idea how to use it…
I think I made the wrong function call. But how to fix it?
Thank you!