In an AudioProcessorGraph, I need an AudioProcessor that captures the audio stream and saves it to a file, while passing the input stream unchanged to the next AudioProcessor in the render chain. I want to use this to bounce live performances of my host to disk.
So far I found the Juce Demo code and AudioFormatWriter::ThreadedWriter, but unfortunately it only takes float** as the argument to write(), which an AudioSampleBuffer can not deliver. I tried a dirty hack with casting AudioSampleBuffer::getSampleData(0) to float**, but that crashed on me.
It would be great if AudioSampleBuffer also had writeFromAudioSampleBuffer(). Would that be possible, or do I miss something?