-
Notifications
You must be signed in to change notification settings - Fork 64
Pausing/closing audio repeats the buffer in Chromium indefinitely #69
Comments
Just noticed that bc41280 isn't included in a release yet. Not sure if it's really it, as pausing seems to be also affected, but it might be. Is there some easy way to use a HEAD version of the port? |
Looking at the code, I don't see any support for actually pausing the AudioContext (https://webaudio.github.io/web-audio-api/#dom-audiocontext-suspend) - might be a good thing to actually add to reduce CPU and power usage when audio device is paused. |
You can edit |
Thanks! ...but nope, doesn't help. |
Do you have a example to test with? |
I have similar issue when switching tabs or minimizing Chrome. My fix:
.c file:
|
This workaround does the job... but it would be nice if it wasn't necessary. Any chance of this being fixed some time soon? |
Might just be a case of filling the buffer with 0s in the |
Is there any kind of workaround to the problem mentioned in the OP? This is still happening on Chrome. Worse, the device keeps looping the buffer but the audioCallback function is not called, so I can't even fill the buffer with 0s when I want to silence the audio device. My only option would be to completely forget about pausing the device and instead have it continually play, simply silencing it by filling it with 0s, but that means making my entire program less efficient & consuming more power to accomodate a Chrome-specific bug. |
When using SDL_PauseAudioDevice or SDL_CloseAudioDevice, the sound doesn't stop in Chromium - instead, the last buffer contents seems to be repeated indefinitely (remember the bluescreens in Windows 9x? ;)).
Works as expected in Firefox.
Tested with Emscripten 1.38.21.
The text was updated successfully, but these errors were encountered: