diff options
Diffstat (limited to '')
-rw-r--r-- | src/audio_format.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/audio_format.h b/src/audio_format.h index 1cfb258ae..d2461a338 100644 --- a/src/audio_format.h +++ b/src/audio_format.h @@ -27,6 +27,18 @@ struct audio_format { mpd_sint8 channels; }; +static inline void audio_format_clear(struct audio_format *af) +{ + af->sampleRate = 0; + af->bits = 0; + af->channels = 0; +} + +static inline int audio_format_defined(const struct audio_format *af) +{ + return af->sampleRate != 0; +} + static inline int audio_format_equals(const struct audio_format *a, const struct audio_format *b) { |