summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXANTRONIX Development2022-02-23 20:19:00 -0500
committerXANTRONIX Development2022-02-23 20:19:00 -0500
commita667236c6216641f0d6158d554335097f25ee373 (patch)
treeb7b0dd6c2522b4d716f26fdbc706ecb801547e52 /src
parent52b99333c5e8cf3b757cd6e88fca13d420b54979 (diff)
downloadxas-a667236c6216641f0d6158d554335097f25ee373.tar.gz
xas-a667236c6216641f0d6158d554335097f25ee373.tar.bz2
xas-a667236c6216641f0d6158d554335097f25ee373.zip
Implement xas_audio_format_eq()
Implement xas_audio_format_eq() to compare xas_audio_format objects for equivalence
Diffstat (limited to 'src')
-rw-r--r--src/audio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/audio.c b/src/audio.c
index da656f2..bc2e04d 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -4,6 +4,12 @@
#include <xas/audio.h>
+int xas_audio_format_eq(xas_audio_format a, xas_audio_format b) {
+ return a.channels == b.channels
+ && a.sample_size == b.sample_size
+ && a.sample_rate == b.sample_rate;
+}
+
void xas_audio_copy(xas_audio_format format,
void *dest,
void *src,