summaryrefslogtreecommitdiff
path: root/src/channel.h
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-08-26 12:42:30 -0500
committersanine <sanine.not@pm.me>2022-08-26 12:42:30 -0500
commitbde3e4f1bb7b8f8abca0884a7d994ee1c17a66b1 (patch)
tree825ff3669a38ec247bcc9b575a4a4ceb81534d35 /src/channel.h
parent8ec3f8e82acd70410515550fd1790ee5827aafdb (diff)
refactor: move mossrose.h to include/ dir
Diffstat (limited to 'src/channel.h')
-rw-r--r--src/channel.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/channel.h b/src/channel.h
new file mode 100644
index 0000000..23c11d6
--- /dev/null
+++ b/src/channel.h
@@ -0,0 +1,26 @@
+#ifndef MOSSROSE_CHANNEL_H
+#define MOSSROSE_CHANNEL_H
+
+#include <stddef.h>
+#include "mutex.h"
+
+struct mossrose_channel_t {
+ mossrose_mutex_t mutex;
+ float *left;
+ float *right;
+ size_t n_samples;
+ size_t pos;
+};
+
+
+void mossrose_channel_init(struct mossrose_channel_t *chan);
+
+int mossrose_channel_set(struct mossrose_channel_t *chan, float *left, float *right, size_t len, int force);
+
+void mossrose_channel_reset(struct mossrose_channel_t *chan);
+
+int mossrose_channel_advance(float *left, float *right, struct mossrose_channel_t *chan);
+
+void mossrose_channel_destroy(struct mossrose_channel_t *chan);
+
+#endif