summaryrefslogtreecommitdiffstats
path: root/src/bbuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bbuffer.h')
-rw-r--r--src/bbuffer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/bbuffer.h b/src/bbuffer.h
new file mode 100644
index 0000000..6394a11
--- /dev/null
+++ b/src/bbuffer.h
@@ -0,0 +1,19 @@
+#ifndef foosydneybbufferhfoo
+#define foosydneybbufferhfoo
+
+#include <sys/types.h>
+
+/* Simple bounce buffer management routines */
+
+typedef struct sa_bbuffer {
+ void **data;
+ size_t *size;
+ unsigned nchannels;
+ size_t sample_size;
+} sa_bbuffer_t;
+
+int sa_bbuffer_init(sa_bbuffer_t *b, unsigned nchannels, size_t sample_size);
+void sa_bbuffer_done(sa_bbuffer_t *b);
+void* sa_bbuffer_get(sa_bbuffer_t *b, unsigned channel, size_t size, int interleave);
+
+#endif