aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio_format.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-07-19 18:18:32 +0200
committerMax Kellermann <max@duempel.org>2009-07-19 18:18:32 +0200
commitc9d43b4d713d508b6f5b67cfffba9296f9436934 (patch)
tree70100c28e365a244f5c6a361d2ecda332df2a756 /src/audio_format.h
parentc5ec035fb4a533ebd9f8c69b085604560d2a5487 (diff)
parent49ede85827c095d0a6ead0ecb63e83e000a76d4f (diff)
downloadmpd-c9d43b4d713d508b6f5b67cfffba9296f9436934.tar.gz
mpd-c9d43b4d713d508b6f5b67cfffba9296f9436934.tar.xz
mpd-c9d43b4d713d508b6f5b67cfffba9296f9436934.zip
Merge branch 'master' of git://git.infradead.org/users/dwmw2/mpd
Conflicts: Makefile.am
Diffstat (limited to 'src/audio_format.h')
-rw-r--r--src/audio_format.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/audio_format.h b/src/audio_format.h
index 64087d070..54514ff93 100644
--- a/src/audio_format.h
+++ b/src/audio_format.h
@@ -27,6 +27,7 @@ struct audio_format {
uint32_t sample_rate;
uint8_t bits;
uint8_t channels;
+ uint8_t reverse_endian;
};
static inline void audio_format_clear(struct audio_format *af)
@@ -34,6 +35,16 @@ static inline void audio_format_clear(struct audio_format *af)
af->sample_rate = 0;
af->bits = 0;
af->channels = 0;
+ af->reverse_endian = 0;
+}
+
+static inline void audio_format_init(struct audio_format *af,
+ uint32_t sample_rate,
+ uint8_t bits, uint8_t channels)
+{
+ af->sample_rate = sample_rate;
+ af->bits = bits;
+ af->channels = channels;
}
static inline bool audio_format_defined(const struct audio_format *af)
@@ -88,7 +99,8 @@ static inline bool audio_format_equals(const struct audio_format *a,
{
return a->sample_rate == b->sample_rate &&
a->bits == b->bits &&
- a->channels == b->channels;
+ a->channels == b->channels &&
+ a->reverse_endian == b->reverse_endian;
}
/**