Reland "AudioService: Fixes for loopback underruns/timing issues."
This reverts commit c7021cb3. Reason for revert: webkit_layout_test failures were due to flaky tests. The flaky tests have been marked in TestExpectations. Original change's description: > Revert "AudioService: Fixes for loopback underruns/timing issues." > > 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/+/1509365 > Reviewed-by: Robert Liao <robliao@chromium.org> > Commit-Queue: Robert Liao <robliao@chromium.org> > Cr-Commit-Position: refs/heads/master@{#638708} TBR=dalecurtis@chromium.org,miu@chromium.org,robliao@chromium.org,braveyao@chromium.org,maxmorin@chromium.org,ossu@chromium.org Change-Id: If7d8fcd080f057491ec785173ebbf849d1f3bbdd No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 934770 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1509634Reviewed-by:Yuri Wiitala <miu@chromium.org> Commit-Queue: Yuri Wiitala <miu@chromium.org> Cr-Commit-Position: refs/heads/master@{#638752}
Showing
Please register or sign in to comment