
Now, if the AudioContext starts in a "suspended" state, because the browser blocked it from playing by default, we we run the audio "thread" in a timer and throw away the generated audio. Once the AudioContext is allowed to resume, we clear this timer. The end result is that the app will continue to drain its audio queue instead of consuming more memory over time (and, if it relies on an audio callback to make progress, continue to run!), with the effect that the page is merely silent but otherwise functioning as intended. Once the user interacts with the page and the browser permits the the AudioContext to run for real, audio should still be in sync, instead of just starting to play audio that might now be at least several seconds behind.
…
…
Simple DirectMedia Layer (SDL) Version 3.0
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting with README.md
Enjoy!
Sam Lantinga (slouken@libsdl.org)
Description
Languages
C
90.3%
Objective-C
3.5%
C++
1.7%
CMake
1.7%
Java
0.8%
Other
1.8%