Any ways to know what device is attached to computer?


#1

Hi, jules
How are you?
In juce demo, the device configure box shows all the device drivers which are installed on the target computer no matter if the device is really attached to the computer or not. Is there a way to detect what device is really attached to computer and I want to show them only.

Thanks!
Leon


#2

No. You can’t find that out until you actually try to open the driver.


#3

Hi, jules
Thanks!
Shall I do consequential calling one by one to set the devices which are available in some batch program?
If it returns without error, then I know I can show them. In this way, we know the available settable device.
Is there any issue if I do it. I think setDevice cost is big, if we do in this way, it may mess up.

Cheers!
Leon


#4

Sounds kind of pointless to me. People generally know which devices are plugged in when they’re choosing from the list, don’t they?


#5

Hi, jules
Yes. However, for technique perspective, do you think If I call setDevice one by one in batch mode, and is juce lib able to afford it? Because i ran into issue that my application crashed , and shutdownjuceGUI is called.

Thanks!
Leon


#6

Those flakey soundcard drivers aren’t designed to be stopped and started very often.

It really is a Very Bad Idea. Time-consuming, unsafe, and you’ll hit dozens of other subtle problems. Basically: don’t do it.