Skip to content
Snippets Groups Projects

coreaudio: handle unknown channels

  1. Nov 23, 2023
    • Thomas Guillem's avatar
      coreaudio: handle unknown channels · fa227798
      Thomas Guillem authored
      Previously, unknown channels were just ignored, causing output channels
      mismatch. Unknown channels need to be handled by doing:
      
       - Setup the renderer with the total number of channels given by
         kAudioDevicePropertyPreferredChannelLayout
       - Realloc blocks, reorder them, and put 0s for unknown channels
       - Change bytes<>ticks conversion factor (i_bytes_per_frame) to not mess
         with timings.
      
      This can only happen on macOS when the user configured "Speakers" via
      the "Audio MIDI Setup" app.
      fa227798
Loading