diff options
author | sanine <sanine.not@pm.me> | 2022-09-04 00:39:24 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-09-04 00:39:24 -0500 |
commit | 63db9380f84cb3eb35d2de430b0783afa5773e85 (patch) | |
tree | ffc8360c7bc7e670768cbadcf79597c03b9434a2 /include | |
parent | ac48f807cb85423a8063795e3320fedde1ddf5c1 (diff) |
implement callbacks
Diffstat (limited to 'include')
-rw-r--r-- | include/mossrose.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mossrose.h b/include/mossrose.h index 72f7b99..d8573a8 100644 --- a/include/mossrose.h +++ b/include/mossrose.h @@ -4,6 +4,8 @@ #include <stddef.h> #include <stdbool.h> +typedef void (*mossrose_channel_callback_t)(int, void*); + struct mossrose_sound_t { float *left; float *right; @@ -20,5 +22,7 @@ void mossrose_channel_set_volume(int channel, float volume); void mossrose_channel_set_pan(int channel, float left, float right); void mossrose_channel_pause(int channel); void mossrose_channel_resume(int channel); +void mossrose_channel_set_callback(int channel, mossrose_channel_callback_t callback, void *userdata); +void mossrose_poll_callbacks(); #endif |