[Openal] Handling device changes on Vista
niklas at grin.se
Tue Apr 14 02:12:11 PDT 2009
What is the recommended way of handling sound device changes (new
devices being created, old devices being removed) when using OpenAL?
This issue is especially important on Windows Vista where new devices
can appear when a uses plugs in his headphones. (I.e. a game may start
with headphones unplugged and find no devices, then when the headphones
are plugged in a new device appears.)
As far as I can tell, there is no mechanism for detecting "device
creation" or "device loss" within OpenAL. Should I try to detect these
events using Windows functionality? Or regularily poll the system by
enumerating the devices? And then re-initialize the sound system with a
new device if detected.
More information about the Openal