From 63db9380f84cb3eb35d2de430b0783afa5773e85 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 4 Sep 2022 00:39:24 -0500 Subject: implement callbacks --- include/mossrose.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') 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 #include +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 -- cgit v1.2.1