summaryrefslogtreecommitdiffstats
path: root/include/xas
diff options
context:
space:
mode:
authorXANTRONIX Development2022-01-18 13:17:45 -0500
committerXANTRONIX Development2022-01-18 13:17:58 -0500
commit26c62832420553f6f82ec3daeef6df08326fc922 (patch)
treea61000324a75a5965bbfbc3ea3c76a93799f85a9 /include/xas
parent9b6dd9f61ab0f627470a521d626b1d6c476fc7d7 (diff)
downloadxas-26c62832420553f6f82ec3daeef6df08326fc922.tar.gz
xas-26c62832420553f6f82ec3daeef6df08326fc922.tar.bz2
xas-26c62832420553f6f82ec3daeef6df08326fc922.zip
It compiles! Beep! Beep!
Diffstat (limited to 'include/xas')
-rw-r--r--include/xas/mixer.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/xas/mixer.h b/include/xas/mixer.h
new file mode 100644
index 0000000..9fd77cb
--- /dev/null
+++ b/include/xas/mixer.h
@@ -0,0 +1,46 @@
+#ifndef _XAS_MIXER_H
+#define _XAS_MIXER_H
+
+#include <sys/types.h>
+
+#include <xas/audio.h>
+
+typedef struct _xas_mixer_input {
+ xas_audio_stream *stream;
+
+ float gain,
+ bias_l,
+ bias_r;
+
+ struct _xas_mixer_input *next;
+} xas_mixer_input;
+
+typedef struct _xas_mixer {
+ xas_mixer_input *inputs,
+ *last;
+
+ xas_audio_stream *output;
+
+ void *buf;
+ size_t buffer_size;
+} xas_mixer;
+
+xas_mixer *xas_mixer_new(size_t sample_size,
+ size_t sample_rate,
+ size_t channels,
+ size_t buffer_size);
+
+void xas_mixer_destroy(xas_mixer *mixer);
+
+xas_audio_stream *xas_mixer_output(xas_mixer *mixer);
+
+xas_mixer_input *xas_mixer_input_add(xas_mixer *mixer,
+ xas_audio_stream *stream,
+ float gain,
+ float pan);
+
+void xas_mixer_input_set_gain(xas_mixer_input *input, float gain);
+
+void xas_mixer_input_set_pan(xas_mixer_input *input, float pan);
+
+#endif /* _XAS_MIXER_H */