[openal] Runtime devices management
alberto.box66 at gmail.com
Fri Sep 9 08:38:14 EDT 2016
I'd need an advice about capture devices management ... in our system we
initialize openal soft (latest version) at startup. When audio devices are
present they are detected as expected. But, if they are disconnected (e.g.
mic unplugged), at runtime the application doesn't receive any error and
goes on with playing/recording as usual (recording nothing, of course).
Moreover, the device change is not recognized even re-initializing openal
In order to debug my application I've compiled the openal-info.c utility:
well, if I start the application with mic plugged in, it detects the device
as expected; if I start the application without the mic, it detects the
absence of capture device; if I add a code layer, putting the main() in an
infinite loop and adding a sleep(n), once I start the application (and let
it running) it correctly displays the initial status of the microphone, but
nothing change when I disconnect or reconnect the mic. It seems to me that
openal is aware ot the devices status at application startup only, and
doesn't detect any subsequent change even if it is reinitialized.
So, my questions are:
1. Am I doing something wrong?
2. Is there a way to be notified when a device status changes at runtime?
3. Is there a way to make openal initialization (following the first one)
aware of new devices status?
Thank you ....
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openal