From ecc6e379b24dd5e37b864ae599a154880a2bd2d0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 9 May 2013 18:06:26 +0200 Subject: audio/out: channel map selection Make all AOs use what has been introduced in the previous commit. Note that even AOs which can handle all possible layouts (like ao_null) use the new functions. This might be important if in the future ao_select_champ() possibly honors global user options about downmixing and so on. --- audio/out/ao_pcm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'audio/out/ao_pcm.c') diff --git a/audio/out/ao_pcm.c b/audio/out/ao_pcm.c index 1199ab5a90..903e89bc8b 100644 --- a/audio/out/ao_pcm.c +++ b/audio/out/ao_pcm.c @@ -146,7 +146,10 @@ static int init(struct ao *ao, char *params) } } - mp_chmap_reorder_to_waveext(&ao->channels); + struct mp_chmap_sel sel = {0}; + mp_chmap_sel_add_waveext(&sel); + if (!ao_chmap_sel_adjust(ao, &sel, &ao->channels)) + return -1; ao->outburst = 65536; ao->bps = ao->channels.num * ao->samplerate * (af_fmt2bits(ao->format) / 8); -- cgit v1.2.3