-
-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow changing audio output device by updating OpenAL Soft #1841
base: 9.0.0-dev
Are you sure you want to change the base?
Allow changing audio output device by updating OpenAL Soft #1841
Conversation
Try |
I've done that, tried doing a clean rebuild of both lime and my testing project. I keep getting the same error. Could this commit 71442d0 be related? It doesn't seem to be in 9.0 branch |
Oh yeah, if you don't have that merged, you'll need it. Edit: ok, merged into 9.0.0-Dev. You can pull from there. |
Okay, I think I did the merge right. Hashlink seems to be fixed and working fine now! |
I've gotten Mac to build and work! I only have Linux, Android & Neko left to figure out, though CI for them will always fail because it uses an older hxcpp version |
Tested out Linux & it seems to work. I assume Android would also work with just an updated config but I don't know how I'd even test that... Neko seems to crash whenever it tries to dispatch the callback, I'm assuming it's threading related. I'm not sure what the alternative to hxcpp's |
682d3d3
to
dd2d512
Compare
OpenAL seems to use it as well, so it may not be as hacky of a workaround as I thought
I'll undraft this PR now as I think it should be pretty much ready to go except for a few concerns:
|
This PR adds bindings and implements OpenAL Soft's
ALC_SOFT_reopen_device
andALC_SOFT_system_events
extensions. In order to take advantage of this functionality, I had to update OpenAL Soft, which requires using latest hxcpp (git, until there's a new stable release). New versions of OpenAL Soft require the C++17 standard and the current release of hxcpp doesn't seem to have an official way to use it. (Maybe it could be done via compilerflags in the Build.xml?)With these changes, Lime will register a callback that gets called every time there's a new event related to audio devices. If the default audio device is changed, Lime will seamlessly switch all audio sources to play on the new audio device. As a side effect, this also resolves the issue where if the current audio device is disabled (eg. unplugged) all audio sources stop playing.
Closes #1515, openfl/openfl#2642