diff options
Diffstat (limited to 'src/audio_format.h')
-rw-r--r-- | src/audio_format.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/audio_format.h b/src/audio_format.h index b4b40c69f..1cfb258ae 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; |