I am brand-new to JUCE. I’ve played a bit with ALSA, now trying to transition to JUCE…
I am trying to convert the AudioRecordingDemo() into a 6-channel recorder to interface to a USB device I am developing. Obviously I haven’t had success; hence, the reason I’m here…
Three things I need to enforce is the device, samplerate and channel count.
So at the bottom of AudioRecordingDemo() (in./examples/Audio/AudioRecordingDemo.h) I added this code:
std::cout << "Modifying audio setup..." << std::endl;
AudioDeviceManager::AudioDeviceSetup currentAudioSetup;
audioDeviceManager.getAudioDeviceSetup(currentAudioSetup);
currentAudioSetup.inputDeviceName = "NAME_OF_MY_DEVICE";
currentAudioSetup.inputChannels = 6;
currentAudioSetup.sampleRate = 48000;
String resp = audioDeviceManager.setAudioDeviceSetup(currentAudioSetup, true);
if (resp != "") {
std::cout << "deviceManager.setAudioDeviceSetup() failed: " << resp << std::endl;
}
and in startRecording() I modified the createWriterFor() call to take 6 channels.
Then I build/run it and click Record/Stop in the GUI and I see that the .wav file header is set up for 6 channels but the data chunk is always empty. Do I need to modify something in the threadWriter also?
Any suggestions would sure be helpful.