diff options
author | sanine <sanine.not@pm.me> | 2022-08-28 12:41:53 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-08-28 12:41:53 -0500 |
commit | 91726809f9e97d8d4fb7b6c0642234ff96535bdd (patch) | |
tree | 850fd9cc1f391744b48021b83e29e4bd961eda32 /src/channel.h | |
parent | 0d6ece00397ebb9215ccf1af06cce22c3a94197e (diff) |
add channel_init() and channel_reset()
Diffstat (limited to 'src/channel.h')
-rw-r--r-- | src/channel.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/channel.h b/src/channel.h index 6266a10..4d0800b 100644 --- a/src/channel.h +++ b/src/channel.h @@ -2,7 +2,25 @@ #define MOSSROSE_CHANNEL_H #include <stddef.h> +#include <stdbool.h> #include <plibsys.h> +#include <mossrose.h> + + +struct channel_t { + volatile pint active; /* boolean */ + volatile pint paused; /* boolean */ + volatile pint volume; /* 0-255 */ + volatile pint pan; /* -128-127 */ + + PMutex *sound_mutex; + struct mossrose_sound_t sound; + size_t pos; +}; + + +void channel_init(struct channel_t *chan); +void channel_reset(struct channel_t *chan); #endif |