[Openal] Q on device hot-plug

Chris Robinson chris.kcat at gmail.com
Wed Aug 12 08:28:49 PDT 2009


On Tuesday 11 August 2009 2:06:29 pm Michel Donais wrote:
> We are creating casual gaming products, and for us, the ability to connect
> a microphone or a USB headphones/microphone combo while the app is running
> is nearly primordial. Most people in our audience don't keep these
> connected at all times. They usually refrain from connecting the device
> until the last minute.
>
>
>
> I'd love to have a standardized way to be able to  detect such connections
> / disconnections, and then react accordingly. I first thought getting the
> strings would give me proper info, but I guess it doesn't. And I do
> understand why you wouldn't want to change these strings, however, that'd
> be my best tool. And even if I detected these changes outside of OpenAL, I
> don't have a way to reinitialize OpenAL to acknowledge such changes.

Hi.

There was a proposal for an extension to detect when devices are disconnected 
and to update the device list with new devices:

http://icculus.org/alextreg/wiki/ALC_EXT_disconnect

Unfortunately it's still not implemented. It may be a good idea to discuss it 
again, if we're going to be talking about OpenAL 1.2.

FWIW, I only have two issues with the extension:

I don't think it's necessary to specify the behavior of alcOpenDevice(NULL), 
as in question 3, as that's implementation/system behavior that is not really 
affected by this extension. OSX already does it without this extension, and 
having this extension doesn't guarantee that behavior.

And I don't like the idea of the enumeration strings only being valid until 
the next query for them. IMO, the enumerations should change only when the app 
calls something new, so existing behavior won't be changed and risk breaking 
apps that rely on it.


More information about the Openal mailing list