From a0e405532e276bc1b2c9cae0e44295b17d987151 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 28 Aug 2022 23:41:58 -0500 Subject: add channel_pause() and channel_resume() --- src/channel.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/channel.c') diff --git a/src/channel.c b/src/channel.c index b9242c4..0141569 100644 --- a/src/channel.c +++ b/src/channel.c @@ -28,6 +28,18 @@ void channel_reset(struct channel_t *chan) } +void channel_pause(struct channel_t *chan) +{ + p_atomic_int_set(&(chan->paused), true); +} + + +void channel_resume(struct channel_t *chan) +{ + p_atomic_int_set(&(chan->paused), false); +} + + void channel_get_next_sample(float *left, float *right, struct channel_t *chan) { bool active = p_atomic_int_get(&(chan->active)); -- cgit v1.2.1