Hi all, I’m stuck on this simple problem and looking for some guidance. When a certain usb device is connected, I would like to automatically reset my audio inputs and outputs to this device. The problem seems to be that I can’t update the device selector component because updateAllControls
is private. Here’s where I am so far…
String pioneerDJMS9 = "DJM-S9";
auto& deviceTypes = audioDeviceManager.getAvailableDeviceTypes();
for (auto type : deviceTypes)
{
auto deviceNames (type->getDeviceNames());
for (auto device : deviceNames)
{
if (device == pioneerDJMS9)
{
type->createDevice (pioneerDJMS9, pioneerDJMS9);
audioDeviceManager.setCurrentAudioDeviceType (type->getTypeName(), true);
DBG("successful");
}
}
}
Any help is much appreciated!