From f54909d4df1e1f00481e3ca4aae02f9bf7b78668 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 23 Mar 2013 17:23:33 +0100 Subject: ao_alsa: reorder channels from internal to alsa order Currently, internal and alsa order are exactly the same, so this will do absolutely nothing. --- audio/out/ao_alsa.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'audio/out/ao_alsa.c') diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index 366b912b76..3682e76aa3 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -48,6 +48,7 @@ #include "ao.h" #include "audio_out_internal.h" #include "audio/format.h" +#include "audio/reorder_ch.h" static const ao_info_t info = { @@ -790,6 +791,11 @@ static int play(void* data, int len, int flags) len = len / ao_data.outburst * ao_data.outburst; num_frames = len / bytes_per_sample; + int bps = af_fmt2bits(ao_data.format) / 8; + reorder_channel_nch(data, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT, + AF_CHANNEL_LAYOUT_ALSA_DEFAULT, + ao_data.channels, len / bps, bps); + //mp_msg(MSGT_AO,MSGL_ERR,"alsa-play: frames=%i, len=%i\n",num_frames,len); if (!alsa_handler) { -- cgit v1.2.3