My questions are specifically related to USB Audio/MIDI devices that use the generic OS drivers.
Is it possible to get notification from the AudioDeviceManager when the audio/MIDI device list changes? In the situation I’m working with, it’s conceivable that the user will add or remove USB audio devices on the fly. I’ve thought of periodically polling the device names and detecting a change that way. This will not be foolproof though, since the device names are generic - “USB Audio Device” (in Windows anyway). The user could switch devices in between polls, and the names would look the same.
Related to the above; if my application enables a USB MIDI device, and then at some point the user decides to unplug the device, juce continually generates asserts (the call to midiInAddBuffer in MidiInThread::writeBlock() fails). How should the application recover from this situation?
My application is only concerned with MIDI, so I’m calling AudioDeviceManager::initialise() with 0 input and 0 output channels. This worked in version 1.46, but now in 1.50 an error is returned: “Can’t open the audio device! This may be because another application is currently using the same device - if so, you should close any other applications and try again!”. Ignoring the error does not seem to have any ill effects. Is it no longer valid to specify 0 I/O channels?