[Openal-devel] ALC_ENUMERATE_ALL_EXT and pluggable sound devices
Guilherme Balena Versiani
guibv at comunip.com.br
Wed Sep 23 11:22:22 PDT 2009
Do you know where can I find an implementation that supports
ALC_EXT_disconnect? Is this extension multiplatform (I mean it is
available)?
Can you explain me how the ALC_EXT_disconnect combines with OpenAL32.lib
Router (Windows Router)? The problem I reported involves to change it, even
if the OpenAL driver implementation supports ALC_EXT_disconnect...
Best regards,
-- Guilherme Balena Versiani.
2009/9/21 Ryan C. Gordon <icculus at icculus.org>
>
> 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.
>>
>
> ALC_EXT_disconnect isn't a function, it's an extension name that, among
> other things, specifies behaviour #1. So this is an easy solution. :)
>
> The router will need to be fixed to support ALC_EXT_disconnect, if it is
> caching device names on behalf of the lower-level implementation.
>
> 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.
>>
>
> That's what ALC_EXT_disconnect is for: it specifies that this is what
> happens.
>
> http://icculus.org/alextreg/wiki/ALC_EXT_disconnect
>
> Basically, this use case is totally covered by this extension. The app can
> poll for the specific device (without using alcGetString()) to see if it was
> disconnected, to decide if they need to stop the game and ask the user to
> pick a new device:
>
> ALint connected = 0;
> alcGetIntegerv(myDevice, ALC_CONNECTED, &connected);
> if (!connected) {
> alcCloseDevice(myDevice);
> ask_user_to_pick_a_new_device_or_whatever();
> }
>
> No parsing of device lists required.
>
> What we're talking about, really, is the opposite: how to know when new
> hardware shows up (although it could be used to know when something
> disconnected, too).
>
> --ryan.
>
>
> _______________________________________________
> Openal-devel mailing list
> Openal-devel at opensource.creative.com
> http://opensource.creative.com/mailman/listinfo/openal-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://opensource.creative.com/pipermail/openal-devel/attachments/20090923/ceb4ca8c/attachment.html
More information about the Openal-devel
mailing list