[openal] ALC_SOFT_reopen_device extension proposal
Guillermo Hugo Ojea Quintana
ghojea at gmail.com
Wed Dec 8 14:35:46 EST 2021
This extension would be extremely useful.
So, the idea is that we have already opened and initialized some device and
device = alcOpenDevice("OpenAL Soft on Altavoces");
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?
El jue, 2 dic 2021 a las 15:31, Chris Robinson (<chris.kcat at gmail.com>)
> This extension is primarily designed to allow apps to change which output
> OpenAL device plays on without having to destroy and recreate everything.
> can be in response to a device becoming disconnected and wanting to move
> context and everything to another still-accessible device, or the default
> device changing (although the app is responsible for detecting that,
> with system calls or manually polling the default device regularly; a
> extension is expected to address this shortcoming), or changes in the
> 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
> 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
> current Git under ALC_SOFTX_reopen_device, and will be renamed to
> ALC_SOFT_reopen_device when the extension is finalized after any changes
> adjustments to the API are made.
> Any questions, comments, and suggestions are welcome.
> openal mailing list
> openal at openal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openal