mirror of
https://github.com/mpv-player/mpv
synced 2024-11-18 21:16:10 +01:00
41aefce730
Switch the internal channel order to libavcodec's. If the channel number mismatches at some point, use libavresample for up- or downmixing. Remove the old af_pan automatic downmixing. The libavcodec channel order should be equivalent to WAVEFORMATEX order, at least nowadays. reorder_ch.h assumes that WAVEFORMATEX and libavcodec might be different, but all defined channels have the same mappings. Remove the downmixing with af_pan as well as the channel conversion with af_channels from af.c, and prefer af_lavrresample for this. The automatic downmixing behavior should be the same as before (if the --channels option is set to 2, which is the default, the audio output is forced to 2 channels, and libavresample does all downmixing). Note that mpv still can't do channel layouts. It will pick the default channel layout according to the channel count. This will be fixed later by passing down the channel layout as well. af_hrtf depends on the order of the input channels, so reorder to ALSA (for which this code was written). This is better than changing the filter code, which is more risky. ao_pulse can accept waveext order directly, so set that as channel mapping. |
||
---|---|---|
.. | ||
ao_alsa.c | ||
ao_coreaudio.c | ||
ao_dsound.c | ||
ao_jack.c | ||
ao_lavc.c | ||
ao_null.c | ||
ao_openal.c | ||
ao_oss.c | ||
ao_pcm.c | ||
ao_portaudio.c | ||
ao_pulse.c | ||
ao_rsound.c | ||
ao_sdl.c | ||
ao.c | ||
ao.h | ||
audio_out_internal.h |