diff options
author | wm4 <wm4@nowhere> | 2015-05-04 23:59:20 +0200 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-05-07 10:47:00 +0900 |
commit | 604daa861fa6cda1b118a20e06269b1a4a6c3f21 (patch) | |
tree | d7923ea0b6b27fb7250dec9228f95b31b5354cd0 /DOCS/edl-mpv.rst | |
parent | 322c79a6e1bac2e8f1a5e042ac0b635c9dae629f (diff) | |
download | mpv-604daa861fa6cda1b118a20e06269b1a4a6c3f21.tar.bz2 mpv-604daa861fa6cda1b118a20e06269b1a4a6c3f21.tar.xz |
audio: introduce support for padding channels
Some audio APIs explicitly require you to add dummy channels. These are
not rendered, and only exist for the sake of the audio API or hardware
strangeness. At least ALSA, Sndio, and CoreAudio seem to have them.
This commit is preparation for using them with ao_coreaudio.
The result is a bit messy. libavresample/libswresample don't have good
API for this; avresample_set_channel_mapping() is pretty useless.
Although in theory you can use it to add and remove channels, you
can't set the channel counts. So we do the ordering ourselves by making
sure the audio data is planar, and by swapping the plane pointers. This
requires lots of messiness to get the conversions in place. Also, the
input reordering is still done with the "old" method, and doesn't
support padded channels - hopefully this will never be needed. (I tried
to come up with cleaner solutions, but compared to my other attempts,
the final commit is not that bad.)
(cherry picked from commit 06050aed9906b784159ad03e86e13348c4d9fa47)
Diffstat (limited to 'DOCS/edl-mpv.rst')
0 files changed, 0 insertions, 0 deletions