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

I’m trying to use

juce::AudioDataConverters::deinterleaveSamples

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


threadedWriter.reset (new juce::AudioFormatWriter::ThreadedWriter (writer, backgroundThread, 32768));
            threadedWriter->write(????,
                                  getCurrentRecorder()->sharedConsumableRotatingBuffer->buffer.size());

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:
https://docs.juce.com/master/classAudioBuffer.html#a6f52c02a21eb14d53e2a6fa46a825f4f