[openal] ALC_SOFT_reopen_device extension proposal

Sean s.tolstoyevski at gmail.com
Wed Dec 8 23:47:48 EST 2021


Looks like a great extension.

In which version will it be available?

On 08/12/2021 22:57, Chris Robinson wrote:
> On Wednesday, December 8, 2021 11:35:46 AM PST Guillermo Hugo Ojea Quintana
> wrote:
>> 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?
> Correct. The device stops playing on the old device and starts playing on the
> new one, and all of its contexts and associated objects remain valid. There's
> no need to recreate anything.
>
>> If there is sound playing what would happen?
> It keeps playing, with the output on the new device instead of the old one.
> Under the hood, OpenAL Soft stops the system device currently associated with
> the ALCdevice, which pauses mixing and leaves the state of everything as-is.
> Then it attempts to open the new requested system device, and if successful,
> re-associates the ALCdevice with it, closes the old system device, and
> configures and starts output on the new device, resuming everything to
> continue right from where it left off.
>
>
> _______________________________________________
> openal mailing list
> openal at openal.org
> http://openal.org/mailman/listinfo/openal


More information about the openal mailing list