aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio_format.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-03-19 09:58:07 +0100
committerMax Kellermann <max@duempel.org>2011-03-19 09:58:07 +0100
commit0c9fc2f8090ed225c76296088e6760630eb42779 (patch)
tree9238436fb89ebf6a91d329eba0f5feec1ad137fd /src/audio_format.h
parent1a954748a027aa5b4fc6c85b0ad96c2fa25d53b8 (diff)
parentfe588a255ba713875a21bb98d3b7daf60af2844e (diff)
downloadmpd-0c9fc2f8090ed225c76296088e6760630eb42779.tar.gz
mpd-0c9fc2f8090ed225c76296088e6760630eb42779.tar.xz
mpd-0c9fc2f8090ed225c76296088e6760630eb42779.zip
Merge commit 'release-0.16.2'
Conflicts: Makefile.am NEWS configure.ac
Diffstat (limited to '')
-rw-r--r--src/audio_format.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/audio_format.h b/src/audio_format.h
index 340e4987d..1a54a092a 100644
--- a/src/audio_format.h
+++ b/src/audio_format.h
@@ -22,6 +22,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include <assert.h>
enum sample_format {
SAMPLE_FORMAT_UNDEFINED = 0,
@@ -219,6 +220,9 @@ static inline void
audio_format_mask_apply(struct audio_format *af,
const struct audio_format *mask)
{
+ assert(audio_format_valid(af));
+ assert(audio_format_mask_valid(mask));
+
if (mask->sample_rate != 0)
af->sample_rate = mask->sample_rate;
@@ -227,6 +231,8 @@ audio_format_mask_apply(struct audio_format *af,
if (mask->channels != 0)
af->channels = mask->channels;
+
+ assert(audio_format_valid(af));
}
/**