• Guido Urdaneta's avatar
    Use device sources as label in audio device enumerations on Mac · ed22b40d
    Guido Urdaneta authored
    On Mac, audio devices may have an active source.
    For example, the built-in audio device might be using the internal
    speakers or headphones (same device, different sources).
    This CL changes audio device enumerations so that the device label
    uses the source instead of the device name if the source is available.
    
    The reason is that the source (together with the transport, added in
    crrev.com/c/980951) is a better description of the device.
    
    Some examples:
    
    Before: "Built-in Microphone"
    Now: "External Microphone (Built-in)" or "Internal Microphone (Built-in)"
    
    Before: "Built-in Output"
    Now: "Internal Speakers (Built-in)" or "Headphones (Built-in)"
    
    Before: "HDMI"
    Now: "HP Z30i (HDMI)"
    
    This change also requires firing the devicechange event if the source for
    a device changes, since that results in a change to the enumeration results.
    This CL includes the required changes to AudioDeviceListenerMac.
    
    Bug: 811687
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
    Change-Id: Ieb6801fe979cfed528036862471203f5d29e4603
    Reviewed-on: https://chromium-review.googlesource.com/984312
    Commit-Queue: Guido Urdaneta <guidou@chromium.org>
    Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#547662}
    ed22b40d
device_monitor_mac.mm 17.6 KB