summaryrefslogtreecommitdiff
path: root/src/channel.c
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-08-28 23:41:58 -0500
committersanine <sanine.not@pm.me>2022-08-28 23:41:58 -0500
commita0e405532e276bc1b2c9cae0e44295b17d987151 (patch)
tree06567f45b861756456c03651d07b78127d46a68f /src/channel.c
parentd232fd1b3add3a93b81fc040d8b7e165590930cf (diff)
add channel_pause() and channel_resume()
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c12
1 files changed, 12 insertions, 0 deletions
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));