diff options
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/ao_alsa.c | 7 | ||||
-rw-r--r-- | libao2/ao_dsound.c | 7 | ||||
-rw-r--r-- | libao2/ao_pcm.c | 2 |
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, |