How to create a buffer to use juce::AudioDataConverters::deinterleaveSamples?

I’m trying to use


to deinterleave a sample so I can write with my ThreadedWriter:

threadedWriter.reset (new juce::AudioFormatWriter::ThreadedWriter (writer, backgroundThread, 32768));

How do I create the float** dest? Is there some functions that do this?

static void AudioDataConverters::deinterleaveSamples ( const float * source ,

float ** dest ,
int numSamples ,
int numChannels
) static

Create an AudioBuffer as the destination, then use this function: