• Robert Liao's avatar
    Revert "AudioService: Fixes for loopback underruns/timing issues." · c7021cb3
    Robert Liao authored
    This reverts commit 4f9a19f1.
    
    Reason for revert: Suspected in causing webkit_layout_test failures
    https://ci.chromium.org/p/chromium/builders/ci/Mac10.13%20Tests%20%28dbg%29/9784
    * media/video-played-collapse.html
    * virtual/video-surface-layer/media/video-played-collapse.html
    
    Original change's description:
    > AudioService: Fixes for loopback underruns/timing issues.
    > 
    > Fixes a "choppy audio" issue on platforms with certain audio timing
    > parameters/scenarios. Investigation on crbug.com/934770 led to the
    > realization that three related problems needed to be addressed:
    > 
    > 1. Fix the "gap" detection in audio::SnooperNode to check in BOTH
    > directions, not just one direction; and on both the input and output
    > flows. This accounts for the case where a device-switch in
    > audio::OutputController results in a sudden drastic shift in the delay
    > timestamps.
    > 
    > 2. Add automatically-increasing capture delay logic to
    > audio::LoopbackStream to ensure the reads from all nodes' delay buffer
    > will never result in underrun.
    > 
    > 3. Increased the accuracy of media::FakeAudioWorker/OutputStream by: a)
    > addressing a subtle source of error in task scheduling delay math due to
    > integer truncation; b) exposing timestamps to worker callbacks that
    > allow FakeAudioOutputStream to provide a |delay| and |delay_timestamp|
    > that behaves just like a real AudioOutputStream. This "lessens the blow"
    > of a device-switch to SnooperNode.
    > 
    > Bug: 934770
    > Change-Id: Ia75f18b2be3ad905f27d6ad882df9632764bb81c
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504981
    > Commit-Queue: Yuri Wiitala <miu@chromium.org>
    > Reviewed-by: Max Morin <maxmorin@chromium.org>
    > Reviewed-by: Oskar Sundbom <ossu@chromium.org>
    > Reviewed-by: Weiyong Yao <braveyao@chromium.org>
    > Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#638427}
    
    TBR=dalecurtis@chromium.org,miu@chromium.org,braveyao@chromium.org,maxmorin@chromium.org,ossu@chromium.org
    
    Change-Id: I845f547c60481ebde0ae24d1a83d59f2f750f7e3
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Bug: 934770
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1509365Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
    Commit-Queue: Robert Liao <robliao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#638708}
    c7021cb3
fake_audio_output_stream.h 1.76 KB