[Openal-devel] ALC_ENUMERATE_ALL_EXT and pluggable sound devices
Guilherme Balena Versiani
guibv at comunip.com.br
Mon Sep 21 10:20:27 PDT 2009
Hello people,
Following the division of the problem, that seems we all agreed, I would
like to concentrate on the device listing only, and let the device
notification for another discussion.
We have two solutions until now:
1) alcGetString always returns a "fresh" list of the available
devices, in a way opposite to the current Router behavior that is to
save a list in static memory and return the same list for every
subsequent call;
2) The application must call ALC_EXT_disconnect to force the list to
be cleaned up.
I personally like the first option, as IMHO this is far more simple to
implement and adapt.
Let me create a metaphore of a real situation:
1) Suppose you have an application, and in the moment you started
it, you didn't connect the soundcard device (for example an USB headset).
2) You start some kind of transaction in the application that won't
persist if you restart the application (for example a tournament on a game).
3) You connect an USB headset and now you want to use it in the
current running application.
How this could be solved (this is one solution, maybe you can have others):
1) You open a configuration menu of the application and go to sound
configuration tab.
2) In this moment, the application just calls alcGetString to create
the device list combo box and shows to the user.
3) The user changes the device and the application calls
alcOpenDevice/alcCreateContext/alcMakeContextCurrent to change OpenAL
rendering device.
If the alcGetString function just resets the device listing for every
call, the application will start to work as expected.
Another case is when you disconnect the USB device. If this device was
selected by the OpenAL library, I think it is expected by the user that
the application stops to play sounds, and some kind of intervention
should be executed to adjust the sound playing again.
Regards,
-- Guilherme Balena Versiani.
More information about the Openal-devel
mailing list