Skip to content

osxaudio: correct channel mapping for surround channels

This MR does two things:

  1. Correcting existing mappings:
    1. GST_AUDIO_CHANNEL_POSITION_REAR_LEFT is now mapped to kAudioChannelLabel_RearSurroundLeft
    2. GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT is now mapped to kAudioChannelLabel_RearSurroundRight
    3. ... and vice versa
  2. Adding mapping for TOP_CENTER and SURROUND_{LEFT,RIGHT} channels

Basically, what's this needed for is to ensure correct support for 16 channel output devices on macOS.

Consider the following pipeline:

audiotestsrc ! osxaudiosink device-id=<device-id> (where device-id is an ID of 16 channel output, Blackhole 16ch in my case)

Previously, audiotestsrc would generate only 15 channels, and the channel 12 is just skipped.

The same occurs when running gst-device-monitor-1.0 : it reports that Blackhole 16ch has 15 channels, due to the same reason.

Merge request reports