aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio_format.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_format.h')
-rw-r--r--src/audio_format.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/audio_format.h b/src/audio_format.h
index a4450ad71..6e4f94b71 100644
--- a/src/audio_format.h
+++ b/src/audio_format.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -44,6 +44,8 @@ enum sample_format {
SAMPLE_FORMAT_S32,
};
+static const unsigned MAX_CHANNELS = 8;
+
/**
* This structure describes the format of a raw PCM stream.
*/
@@ -180,7 +182,7 @@ audio_valid_sample_format(enum sample_format format)
static inline bool
audio_valid_channel_count(unsigned channels)
{
- return channels >= 1 && channels <= 8;
+ return channels >= 1 && channels <= MAX_CHANNELS;
}
/**