• dalecurtis's avatar
    Disable low latency audio under remote desktop sessions. · d0d6ea4b
    dalecurtis authored
    CoreAudio seems to be the source of a lot of hangs when under a
    remote desktop session and we've had past success with moving
    these users over to WaveOut, so do so for all remote sessions.
    
    This first queries the SM_REMOTESESSION system metric and then
    tries to get the friendly name of the default audio device; if
    it can't do that and a remote session is present or it can and
    friendly name is "Remote Audio", CoreAudio functions are
    disabled.
    
    This change also adds a check to WASAPIAudioOutputStream::Open
    to fail when a remote audio stream is requested; which will
    trigger fallback in the AudioOutputResampler (if the user
    resumes their session locally later they'll get WASAPI again
    once streams have been closed for a few seconds).
    
    BUG=422522
    TEST=remote desktop session w/ remote audio gets WaveOut; works
    with xfreerdp and Microsoft Remote Desktop client for OS; local
    session gets WASAPI, connecting and starting a stream remotely
    gets WaveOut.
    
    Review URL: https://codereview.chromium.org/1060673002
    
    Cr-Commit-Position: refs/heads/master@{#324246}
    d0d6ea4b
audio_low_latency_output_win.cc 23.6 KB