Hello.
I have been trying to record sound via Juce but audioDeviceManager.getCurrentAudioDevice() returns null.
When I iterate through my devices, I can see my sound devices, however current is as I said, null.
Is there a way to force set it or is there something really wrong? I am completely new in Juce and C++ components so a "For dummies" version would be appreciated!
Below is my code:
audioDeviceManager.initialiseWithDefaultDevices(1,1);
AudioIODeviceType *deviceType = audioDeviceManager.getCurrentDeviceTypeObject(); deviceType->scanForDevices(); StringArray deviceNames = deviceType->getDeviceNames(); for(auto itr = deviceNames.begin(); itr != deviceNames.end(); ++itr) myfile << "Device name : " + *itr + "\n";//I get the device names properly above
if (AudioIODevice* device = audioDeviceManager.getCurrentAudioDevice())//This condition is false.
