diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-02-02 20:01:53 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-29 02:35:10 +0000 |
commit | 0728e4778f711c12a0c94add133befdbba1e4c86 (patch) | |
tree | 9d34607b46f1989976201d3dbc0a353239ad3f1f /audio/out | |
parent | db59a1c1a76f9a4c5390b47d715aabd7dfd2e83e (diff) | |
download | mpv-0728e4778f711c12a0c94add133befdbba1e4c86.tar.bz2 mpv-0728e4778f711c12a0c94add133befdbba1e4c86.tar.xz |
chmap: add more channel layouts up to 22.2
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao_coreaudio_chmap.c | 9 | ||||
-rw-r--r-- | audio/out/ao_pipewire.c | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/audio/out/ao_coreaudio_chmap.c b/audio/out/ao_coreaudio_chmap.c index 13ac87e2ba..3fd95503c9 100644 --- a/audio/out/ao_coreaudio_chmap.c +++ b/audio/out/ao_coreaudio_chmap.c @@ -15,6 +15,8 @@ * License along with mpv. If not, see <http://www.gnu.org/licenses/>. */ +#include <Availability.h> + #include "common/common.h" #include "ao_coreaudio_utils.h" @@ -47,6 +49,13 @@ static const int speaker_map[][2] = { { kAudioChannelLabel_LeftWide, MP_SPEAKER_ID_WL }, { kAudioChannelLabel_RightWide, MP_SPEAKER_ID_WR }, { kAudioChannelLabel_LFE2, MP_SPEAKER_ID_LFE2 }, +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000 + { kAudioChannelLabel_LeftTopSurround, MP_SPEAKER_ID_TSL }, + { kAudioChannelLabel_RightTopSurround, MP_SPEAKER_ID_TSR }, + { kAudioChannelLabel_CenterBottom, MP_SPEAKER_ID_BFC }, + { kAudioChannelLabel_LeftBottom, MP_SPEAKER_ID_BFL }, + { kAudioChannelLabel_RightBottom, MP_SPEAKER_ID_BFR }, +#endif { kAudioChannelLabel_HeadphonesLeft, MP_SPEAKER_ID_DL }, { kAudioChannelLabel_HeadphonesRight, MP_SPEAKER_ID_DR }, diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c index 0b3f5fb483..c545a571c4 100644 --- a/audio/out/ao_pipewire.c +++ b/audio/out/ao_pipewire.c @@ -133,6 +133,11 @@ static enum spa_audio_channel mp_speaker_id_to_spa(struct ao *ao, enum mp_speake case MP_SPEAKER_ID_SDL: return SPA_AUDIO_CHANNEL_SL; case MP_SPEAKER_ID_SDR: return SPA_AUDIO_CHANNEL_SL; case MP_SPEAKER_ID_LFE2: return SPA_AUDIO_CHANNEL_LFE2; + case MP_SPEAKER_ID_TSL: return SPA_AUDIO_CHANNEL_TSL; + case MP_SPEAKER_ID_TSR: return SPA_AUDIO_CHANNEL_TSR; + case MP_SPEAKER_ID_BFC: return SPA_AUDIO_CHANNEL_BC; + case MP_SPEAKER_ID_BFL: return SPA_AUDIO_CHANNEL_BLC; + case MP_SPEAKER_ID_BFR: return SPA_AUDIO_CHANNEL_BRC; case MP_SPEAKER_ID_NA: return SPA_AUDIO_CHANNEL_NA; default: MP_WARN(ao, "Unhandled channel %d\n", mp_speaker_id); |