when using System::getNumDrivers() followed by System::getDriverInfo() to get a list of the devices available on my machine, is there a guarantee about the order of the detected devices?
Example: if I have two devices A and B, getDriverInfo(0) gives me info about A and getDriverInfo(1) gives me info about B => can I be sure that this will always works like that? Won’t I get sometimes info about B for 0, for instance?
- acgrama asked 7 years ago
The order of devices is largely dependant on the what the underlying API decides to give us. However you can be assured that the first device in the list will always be the default output device for each platform.
The only way the enumerated list will change is if you remove or add a device, generally via USB. You can be notified when this occurs by using System::setCallback and watching for the device list changed notification.
Please login first to submit.