mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-22 11:18:14 +00:00
audio: Fix locking in backends that manage their own callback threads.
Otherwise you might get a race where an app pauses the device, but the audio callback still manages to run after the pause is in place.
This commit is contained in:
@@ -28,6 +28,11 @@
|
||||
|
||||
#include <emscripten/emscripten.h>
|
||||
|
||||
/* !!! FIXME: this currently expects that the audio callback runs in the main thread,
|
||||
!!! FIXME: in intervals when the application isn't running, but that may not be
|
||||
!!! FIXME: true always once pthread support becomes widespread. Revisit this code
|
||||
!!! FIXME: at some point and see what needs to be done for that! */
|
||||
|
||||
static void
|
||||
FeedAudioDevice(_THIS, const void *buf, const int buflen)
|
||||
{
|
||||
|
Reference in New Issue
Block a user