aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/audio.c b/src/audio.c
index dfc209b32..dc5b26e50 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -62,8 +62,13 @@ void copyAudioFormat(AudioFormat * dest, AudioFormat * src) {
memcpy(dest, src, sizeof(AudioFormat));
}
-int cmpAudioFormat(AudioFormat * f1, AudioFormat * f2) {
- return memcmp(f1, f2, sizeof(AudioFormat));
+int cmpAudioFormat(AudioFormat * f1, AudioFormat * f2)
+{
+ if (f1 && f2 && (f1->sampleRate == f2->sampleRate) &&
+ (f1->bits == f2->bits) &&
+ (f1->channels == f2->channels))
+ return 0;
+ return 1;
}
extern AudioOutputPlugin alsaPlugin;