summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/audio.c b/src/audio.c
index aedc4c0..95c727e 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -11,6 +11,14 @@ int xas_audio_format_eq(xas_audio_format a, xas_audio_format b) {
&& a.sample_rate == b.sample_rate;
}
+xas_audio_format xas_audio_format_mono(xas_audio_format format) {
+ return (xas_audio_format){
+ .channels = XAS_AUDIO_MONO,
+ .sample_size = format.sample_size,
+ .sample_rate = format.sample_rate
+ };
+}
+
void xas_audio_zero(xas_audio_format format,
void *dest,
size_t index,