diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-10-10 19:52:03 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-10-10 19:52:03 -0700 |
commit | 36b0f83075c15fc8d107ece20bd6be95a8d2588c (patch) | |
tree | ad85c51109d3c765f88dc35585dd640d6e77ed96 /src/play.h | |
parent | cbbe0abec7e0e0f21f3315b455f3f795cedf2c9a (diff) |
Sometimes a more granular main loop integration is required.
In such situations play_run() taking over is untenable, so this
splits out the body of play_run()'s loop as a separately callable
function. Existing main loops can use this to run the play main
loop for a single slice.
The impetus for this has been experimenting with escripten
support in SARS, e.g.
emscripten_set_main_loop_arg((void(*)(void *))play_run_slice, play, -1, 1);
Diffstat (limited to 'src/play.h')
-rw-r--r-- | src/play.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -57,6 +57,7 @@ typedef struct play_ops_t { play_t * play_startup(int argc, char *argv[], unsigned flags, const play_ops_t *ops[]); int play_shutdown(play_t *play); +int play_run_slice(play_t *play); void play_run(play_t *play); void play_music_set(play_t *play, unsigned flags, const char *fmt, ...); |