[Openal-devel] ALC_ENUMERATE_ALL_EXT and pluggable sound devices

Guilherme Balena Versiani guibv at comunip.com.br
Thu Sep 17 14:21:09 PDT 2009


Comments inline.

Ryan C. Gordon wrote:
>> The tricky part is, perhaps, how an application knows that it should
>> refresh the available devices.  e.g. An application should definitely 
>> not
>> keep calling an enumerate function just to see if anything is 
>> different -
>> that would be really slow.
I think this is a simple answer. When you commonly enumerate the 
available devices? On the configuration menu of you software (normally 
you must open some kind of configuration panel on your software to 
change the render/capture device). This way, a way to solve this is to 
reinitialize the list every time you call:

    - alcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER), or
    - alcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER)

What do you think? The current problem is that the OpenAL driver 
implementation (not the Router) is implemented to save the device names 
in the same way the Router is. I changed the Router in a way that the 
list is resetted every time the above functions was called, but I saw 
same device name "ghosts" in enumeration...

A more complex way to do this is to monitor the USB bus... Every time a 
device is connected or disconnected, you reset the device lists.

> Shouldn't the router just delegate this responsibility to the actual 
> AL implementation? Once it picks a lowlevel implementation it probably 
> shouldn't ever pick a new one. But if a given implementation handles 
> ALC_EXT_disconnect, then it should do all the work.
I think this could be a good option, but the ALX_EXT_disconnect 
extension does not explicitly require this behavior, and so the 
implementors can't trust on it... It should be implemented in a more 
robust way, in such a way the implementors don't get confused about what 
will happen after this OpenAL call.

Regards,

-- Guilherme Balena Versiani.


More information about the Openal-devel mailing list