diff options
author | tack <tack@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-11-10 00:45:19 +0000 |
---|---|---|
committer | tack <tack@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-11-10 00:45:19 +0000 |
commit | 3c2afd67861769e82034b2ca276d2670964fc09c (patch) | |
tree | 9fa61272171332b4352fb34bde7ced4999244444 /libao2/ao_dsound.c | |
parent | 1d30062395914bbc9eef1299c70018df9f333628 (diff) | |
download | mpv-3c2afd67861769e82034b2ca276d2670964fc09c.tar.bz2 mpv-3c2afd67861769e82034b2ca276d2670964fc09c.tar.xz |
Add support for 8 channel audio.
Where 8 channel support is non-trivial (e.g. ao_dsound), at least ensure we
fail gracefully.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29868 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2/ao_dsound.c')
-rw-r--r-- | libao2/ao_dsound.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libao2/ao_dsound.c b/libao2/ao_dsound.c index fc069dad5e..f66042a793 100644 --- a/libao2/ao_dsound.c +++ b/libao2/ao_dsound.c @@ -426,7 +426,12 @@ static int init(int rate, int channels, int format, int flags) DSBUFFERDESC dsbpridesc; DSBUFFERDESC dsbdesc; - //check if the format is supported in general + //check if the channel count and format is supported in general + if (channels > 6) { + UninitDirectSound(); + mp_msg(MSGT_AO, MSGL_ERR, "ao_dsound: 8 channel audio not yet supported\n"); + return 0; + } switch(format){ case AF_FORMAT_AC3: case AF_FORMAT_S24_LE: |