summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-16 06:54:22 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-16 07:01:46 +0200
commit287b62163eed8811b6cd33716c0691d328947d48 (patch)
tree3143d2cb17b32a19e3e7e0aa428210d1bba3eb0b /libao2
parent507f4fe6c7811558b1367e4b64855ae7f9bc8da8 (diff)
parentb411278fbb00767b8013604157a43e0203f66f4c (diff)
downloadmpv-287b62163eed8811b6cd33716c0691d328947d48.tar.bz2
mpv-287b62163eed8811b6cd33716c0691d328947d48.tar.xz
Merge svn changes up to r29912
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_alsa.c7
-rw-r--r--libao2/ao_dsound.c7
-rw-r--r--libao2/ao_pcm.c2
3 files changed, 14 insertions, 2 deletions
diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c
index f47b4fbf3d..1e0967ce4d 100644
--- a/libao2/ao_alsa.c
+++ b/libao2/ao_alsa.c
@@ -467,6 +467,13 @@ static int init(int rate_hz, int channels, int format, int flags)
device.str = "surround51";
mp_msg(MSGT_AO,MSGL_V,"alsa-init: device set to surround51\n");
break;
+ case 8:
+ if (alsa_format == SND_PCM_FORMAT_FLOAT_LE)
+ device.str = "plug:surround71";
+ else
+ device.str = "surround71";
+ mp_msg(MSGT_AO,MSGL_V,"alsa-init: device set to surround71\n");
+ break;
default:
device.str = "default";
mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] %d channels are not supported.\n",channels);
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:
diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c
index 31a94b0c25..a03f41193e 100644
--- a/libao2/ao_pcm.c
+++ b/libao2/ao_pcm.c
@@ -244,7 +244,7 @@ static int play(void* data,int len,int flags){
}
#endif
- if (ao_data.channels == 6 || ao_data.channels == 5) {
+ if (ao_data.channels == 5 || ao_data.channels == 6 || ao_data.channels == 8) {
int frame_size = le2me_16(wavhdr.bits) / 8;
len -= len % (frame_size * ao_data.channels);
reorder_channel_nch(data, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,