[openal] ALC_SOFT_reopen_device extension proposal

Guillermo Hugo Ojea Quintana ghojea at gmail.com
Wed Dec 8 14:35:46 EST 2021


Hello Chris,

This extension would be extremely useful.

So, the idea is that we have already opened and initialized some device and
its context:
ALCdevice *device;
device = alcOpenDevice("OpenAL Soft on Altavoces");

ALCcontext *ctx;
ctx = alcCreateContext(device, NULL);
...

Then, the user wants to change the device, so we would do this:
alcReopenDeviceSOFT(device, "OpenAL Soft on Realtek Digital Output", NULL);

And now the 'device' pointer would refer to the other device?

There would be no need to create a new context, etc?

If there is sound playing what would happen?

Thanks!

El jue, 2 dic 2021 a las 15:31, Chris Robinson (<chris.kcat at gmail.com>)
escribió:

> This extension is primarily designed to allow apps to change which output
> an
> OpenAL device plays on without having to destroy and recreate everything.
> This
> can be in response to a device becoming disconnected and wanting to move
> the
> context and everything to another still-accessible device, or the default
> device changing (although the app is responsible for detecting that,
> either
> with system calls or manually polling the default device regularly; a
> future
> extension is expected to address this shortcoming), or changes in the
> app's
> configuration desiring a different output.
>
> State is obviously maintained when reopening, so a playing source will
> continue playing on the new device right where it left off on the old one.
> OpenAL itself won't miss anything, although this isn't guaranteed to be
> break-
> free if the system decides to drop buffered samples when the old output is
> stopped and closed as the new one is opened and started. It's implemented
> in
> current Git under ALC_SOFTX_reopen_device, and will be renamed to
> ALC_SOFT_reopen_device when the extension is finalized after any changes
> or
> adjustments to the API are made.
>
> Any questions, comments, and suggestions are welcome.
> _______________________________________________
> openal mailing list
> openal at openal.org
> http://openal.org/mailman/listinfo/openal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openal.org/pipermail/openal/attachments/20211208/013727c4/attachment.htm>


More information about the openal mailing list