From be9212ba84a43a1c7ce4c4dcf179bb9ef08929f7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 9 Sep 2008 10:05:15 +0200 Subject: audio: moved cmpAudioFormat() to audio_format.h Rename it to audio_format_equals() and return "true" if they are equal. --- src/audio_format.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/audio_format.h') diff --git a/src/audio_format.h b/src/audio_format.h index b4b40c69..1cfb258a 100644 --- a/src/audio_format.h +++ b/src/audio_format.h @@ -27,6 +27,14 @@ struct audio_format { mpd_sint8 channels; }; +static inline int audio_format_equals(const struct audio_format *a, + const struct audio_format *b) +{ + return a->sampleRate == b->sampleRate && + a->bits == b->bits && + a->channels == b->channels; +} + static inline double audio_format_time_to_size(const struct audio_format *af) { return af->sampleRate * af->bits * af->channels / 8.0; -- cgit v1.2.3