summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-04 23:59:20 +0200
committerwm4 <wm4@nowhere>2015-05-05 01:11:16 +0200
commit06050aed9906b784159ad03e86e13348c4d9fa47 (patch)
treec9cd6861e1c1cc41066cc0663a8e29e28bed4502 /audio/out
parent1b0b094ca2c25ad162f8f8c84ebebef9a963552e (diff)
downloadmpv-06050aed9906b784159ad03e86e13348c4d9fa47.tar.bz2
mpv-06050aed9906b784159ad03e86e13348c4d9fa47.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.)
Diffstat (limited to 'audio/out')
0 files changed, 0 insertions, 0 deletions