Polling for presence of soundcard


#1

What would be the best way to poll for the presence of the soundcard, i.e. regularly ask if it is attached and ready to work (for instance a USB soundcard that can be attached) ?

I tried doing it via a Timer that polls checks every 3 seconds via setAudioDevice(), but it seemed to block for a long time, so the whole GUI Thread was blocked.


#2

Trying to open a device is likely to be very slow - maybe just see if it exists with AudioIODeviceType::getDeviceNames ?


#3

That doesn’t work with ASIO devices, they’re always listed, even if not connected… Any other trick (maybe special trick for ASIO Devices?) ?


#4

Hmm, yes, that’d be a problem for ASIO. Can’t think of any quick tricks you could use…