Using float array in new convolution engine

Hi,
Any thoughts on the simplest way to load a float array impulse into the convolution engine and ignore the sample rate spec, etc. The DSP structure is so neat. Would love to use it for this simpler processes as well.
Thank you

Convolution::copyAndLoadImpulseResponseFromBuffer ?

Thank you.
I saw that, but I am having trouble casting an array of floats or a vector into it. I know this might be basic, but could you someone please provide a one line example of how you would cast a float array as a single channel AudioBuffer& (or embed an AudioBuffer constructor example with a float array) in copyAndLoadImpulseResponseFromBuffer. Previously I have stuck to float arrays in IPP. I just can’t get a hit, which is where the latest c++ has wasted a lot of my time, otherwise I would not resort to such a simple question.

Thank you

AudioBuffer<float> buffer(floatArray, 1, numSamples)
convolution.copyAndLoadImpulseResponseFromBuffer(buffer, getSampleRate(), false, true, numSamples);

Cool thanks. I was trying a bit hard. That is really simple.
Do you mean arrayOfPtrs(orPtr)PointingToPtrs(orPtr)ForFloatArray(s)?

Yes sorry, the input argument is a pointer to an array of float arrays (for multi-channel purposes)

Thank you for your DSP libraries. They really will reduce code, mess and errors for me. Using the DSP just now I could relax about things like hidden glitches in poorly buffered rings and focus just on the audio processing. Knowing it just works properly is lovely.
Brilliant job.

1 Like