aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio_format.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-02 15:43:45 +0100
committerMax Kellermann <max@duempel.org>2009-03-02 15:43:45 +0100
commit8c0bce0b94f37e6dabda60dff0d1fc725567684f (patch)
tree016d36aa501a2bacd4a7a202873a1e7a188fe927 /src/audio_format.h
parenta1561252d0621fbd74dd6eb9be0de28a5b512c1f (diff)
downloadmpd-8c0bce0b94f37e6dabda60dff0d1fc725567684f.tar.gz
mpd-8c0bce0b94f37e6dabda60dff0d1fc725567684f.tar.xz
mpd-8c0bce0b94f37e6dabda60dff0d1fc725567684f.zip
audio_format: allow up to 8 channels
audio_valid_sample_format() verifies the number of channels. Let's just say up to 8 channels is allowed (which is possible with some consumer sound chips). I don't know if there are bigger cards, and since I cannot test it, I'll limit it to 8 for now.
Diffstat (limited to 'src/audio_format.h')
-rw-r--r--src/audio_format.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audio_format.h b/src/audio_format.h
index a7ff30830..92d11e9db 100644
--- a/src/audio_format.h
+++ b/src/audio_format.h
@@ -68,7 +68,7 @@ audio_valid_sample_format(unsigned bits)
static inline bool
audio_valid_channel_count(unsigned channels)
{
- return channels == 1 || channels == 2;
+ return channels >= 1 && channels <= 8;
}
/**