Skip to content
  • dalecurtis's avatar
    Use preferred channel layout on macOS instead of total channel count. · d0beea4e
    dalecurtis authored
    The old GetDeviceChannels() method returns the total number of channels
    on a device, not necessarily how many its configured to use. For devices
    which allocate ranges of channels to different behaviors (mirroring, etc)
    this is completely broken.
    
    Instead use kAudioDevicePropertyPreferredChannelLayout, which seems to
    give us the right information in both the input and output cases. This
    sometimes requires us to make an additional call to convert the given
    information into something we can easily parse.
    
    BUG=671308
    TEST=manual; configure 6 channel virtual device as stereo.
    CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
    
    Review-Url: https://codereview.chromium.org/2695633006
    Cr-Commit-Position: refs/heads/master@{#453023}
    d0beea4e