Hello, I’m attempting to update this function found in an open source convolution reverb project and I’m having trouble replacing the call to copyAndLoadImpulseResponseFromBlock(). It looks like the new member function of juce::dsp::Convolution I want to use for loading my binary data is this one: JUCE: dsp::Convolution Class Reference
(the docs even say it’s for binary data loaded as a resource), but I’m having trouble figuring out how I should go from the juce::dsp::AudioBlock which is holding the ir data to const void*.
Any advice on how to make the conversion here?
Here’s the full function:
void Convolution::loadIR(AudioBlock ir)
{
juce::dsp::ProcessSpec spec;
spec.sampleRate = processor->getSampleRate();
spec.maximumBlockSize = 2048;
spec.numChannels = (juce::uint32)ir.getNumChannels();
// Must be called before loading the impulse response to provide to the convolution
// the maximumBufferSize to handle and the sample rate for optional resampling.
prepare(spec);
copyAndLoadImpulseResponseFromBlock(ir, spec.sampleRate,
ir.getNumChannels() == 2,
false, false, 0);
}
You can see this code in it’s full context here: https://github.com/QVbDev/quantumVerb/blob/6801e015091c182a70e26471d3b58ee736eac2b9/Source/Convolution.cpp#L84