diff options
author | wm4 <wm4@nowhere> | 2013-05-09 18:06:26 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-12 21:24:57 +0200 |
commit | ecc6e379b24dd5e37b864ae599a154880a2bd2d0 (patch) | |
tree | f439d10380a5f234b660cabb236470cabb1d4d0d /audio/out/ao_null.c | |
parent | ab8f28a672fbd8d21a98c265976068e80be082a7 (diff) | |
download | mpv-ecc6e379b24dd5e37b864ae599a154880a2bd2d0.tar.bz2 mpv-ecc6e379b24dd5e37b864ae599a154880a2bd2d0.tar.xz |
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.
Diffstat (limited to 'audio/out/ao_null.c')
-rw-r--r-- | audio/out/ao_null.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/audio/out/ao_null.c b/audio/out/ao_null.c index c4288cffda..53ec2a9a83 100644 --- a/audio/out/ao_null.c +++ b/audio/out/ao_null.c @@ -48,6 +48,12 @@ static int init(struct ao *ao, char *params) { struct priv *priv = talloc_zero(ao, struct priv); ao->priv = priv; + + struct mp_chmap_sel sel = {0}; + mp_chmap_sel_add_any(&sel); + if (!ao_chmap_sel_adjust(ao, &sel, &ao->channels)) + return -1; + int samplesize = af_fmt2bits(ao->format) / 8; ao->outburst = 256 * ao->channels.num * samplesize; // A "buffer" for about 0.2 seconds of audio |