Disconnect asio devices register while scanning for devices

Hello again,

In my own comboBox-deviceList-populator-function I’m doing this:

OwnedArray typeList;
AudioIODeviceType::createDeviceTypes(typeList);
for(int i=0;i<typeList.size();i++)
{
typeList[i]->scanForDevices();
//filling combobox here, complete with section headers for devicetypes
}

This is all pretty straightforward stuff, but It seems that there are some devices in the ASIO section that just aren’t connected. I Think that’s just the way asio works, because I’ve seen the same thing happen in Cubase some years ago.

Offcourse a solution could be trying to create every device, test for succes and then add the device and delete it again, but I could imagine such a solution being very time consuming and really should be implemented in the scanForDevices method!

Why’s is so unreasonable that a disconnected device should show up in the list? Doesn’t seem like a big deal to me, and like you say, that’s just how ASIO works.

Well it’s not unreasonable beyond all belief, but I just don’t see the point in showing devices that aren’t there… Don’t get me wrong, i’m really glad JUCE handles ASIO in the first place!

My choice would probably be to hide them too, but it’s not worth the effort of testing each one. E.g. if you had a dodgy device driver that crashed when you open it, that’d prevent your app from ever starting up.

hmm, I hadn’t thought of that :slight_smile: Users woud certainly blaim the drivers sooner than the app when it crashed when trying to open a specificly chosen device!