<div dir="ltr">Hello Chris,<br><br>This extension would be extremely useful.<br><br>So, the idea is that we have already opened and initialized some device and its context:<br>ALCdevice *device;<br>device = alcOpenDevice("OpenAL Soft on Altavoces");<br><br>ALCcontext *ctx;<br>ctx = alcCreateContext(device, NULL);<br>...<br><br>Then, the user wants to change the device, so we would do this:<br>alcReopenDeviceSOFT(device, "OpenAL Soft on Realtek Digital Output", NULL);<br><br>And now the 'device' pointer would refer to the other device?<br><br>There would be no need to create a new context, etc?<br><br>If there is sound playing what would happen?<br><br>Thanks!<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El jue, 2 dic 2021 a las 15:31, Chris Robinson (<<a href="mailto:chris.kcat@gmail.com">chris.kcat@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This extension is primarily designed to allow apps to change which output an <br>
OpenAL device plays on without having to destroy and recreate everything. This <br>
can be in response to a device becoming disconnected and wanting to move the <br>
context and everything to another still-accessible device, or the default <br>
device changing (although the app is responsible for detecting that, either <br>
with system calls or manually polling the default device regularly; a future <br>
extension is expected to address this shortcoming), or changes in the app's <br>
configuration desiring a different output.<br>
<br>
State is obviously maintained when reopening, so a playing source will <br>
continue playing on the new device right where it left off on the old one. <br>
OpenAL itself won't miss anything, although this isn't guaranteed to be break-<br>
free if the system decides to drop buffered samples when the old output is <br>
stopped and closed as the new one is opened and started. It's implemented in <br>
current Git under ALC_SOFTX_reopen_device, and will be renamed to <br>
ALC_SOFT_reopen_device when the extension is finalized after any changes or <br>
adjustments to the API are made.<br>
<br>
Any questions, comments, and suggestions are welcome.<br>
_______________________________________________<br>
openal mailing list<br>
<a href="mailto:openal@openal.org" target="_blank">openal@openal.org</a><br>
<a href="http://openal.org/mailman/listinfo/openal" rel="noreferrer" target="_blank">http://openal.org/mailman/listinfo/openal</a><br>
</blockquote></div>