Skip to content
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

After computer's audio output source is changed, sounds still use the old output source #2642

Open
DalekCraft2 opened this issue May 19, 2023 · 0 comments

Comments

@DalekCraft2
Copy link

Describe the bug
After changing the audio output source of the computer (e.g., plugging or unplugging headphones into/from the computer), sound continues to use the old output source instead of the new one (or, if the old one is unavailable, it stops playing entirely). If the sound has stopped playing entirely, the sound channel's position field does not update at all, meaning the sound is not just muted, but is actually not playing at all. Also, making the previous output source available again (e.g., by plugging in headphones again) does not fix the sound if it has stopped playing.

To Reproduce
Note: I tested this with OpenFL's PlayingSound demo.
Steps to reproduce the behavior:

  1. Build with CPP or HashLink and run the build
  2. Click the screen to demonstrate that sound plays through the proper output source
  3. Plug or unplug an audio output source (e.g., headphones) into/from the computer
  4. Test sound again, and hear that it uses the previous output source (if it is available) or stops playing entirely (if it is unavailable)

Expected behavior
Sound should play through the new audio output source instead of the old one.

OpenFL Targets
If applicable, write which targets you used and which have this issue.
Tested on AIR, Flash, HTML5, HashLink, and Windows. Only Windows and HashLink had the issue.

Additional context
On HashLink, VS Code's debug console puts out this error as soon as the audio output source is changed:
AL lib: (EE) ALCwasapiPlayback_mixerProc: Failed to get padding: 0x88890004
This might mean it is an internal issue with OpenAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant