Using the AudioRecordingDemo for two channels

I am interested in recording two audio inputs as two separate wav files from my JUCE plugin. I have been looking at the AudioRecordingDemo.h file included in JUCE, and it looks like this can get me there, I’m just not sure how. If I have an audio interface with two channels, and I call the “startRecording()” method from the AudioRecordingDemo class, will it record both channels to a stereo wav file? Is there an easy way to modify this to record two separate wav files at the same time? Also it looks like the wav data is saved as int16, how can I change the code to save as float32?


I think I got it:

//if (auto writer = wavFormat.createWriterFor(fileStream.get(), sampleRate, 1, 16, {}, 0))
if (auto writer = wavFormat.createWriterFor (fileStream.get(), sampleRate, 2, 32, {}, 0))

By changing the inputs to “createWriterFor” from one channels to two, and from 16 to 32 for bitsPerSample.