Commit e9826d74 authored by Oskar Sundbom's avatar Oskar Sundbom Committed by Commit Bot

APM in Audio Service: Fix render delay calculation

The render delay is calculated backwards, making it negative. The
time we're comparing with is in the future, not the past.

Bug: 889494
Change-Id: I3aa8b64096caa9ad5feadcafc1df5bca8e035750
Reviewed-on: https://chromium-review.googlesource.com/1246163Reviewed-by: default avatarMax Morin <maxmorin@chromium.org>
Commit-Queue: Oskar Sundbom <ossu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594648}
parent bb9340f2
...@@ -106,7 +106,7 @@ void AudioProcessor::AnalyzePlayout(const AudioBus& audio, ...@@ -106,7 +106,7 @@ void AudioProcessor::AnalyzePlayout(const AudioBus& audio,
if (!audio_processing_) if (!audio_processing_)
return; return;
render_delay_ = base::TimeTicks::Now() - playout_time; render_delay_ = playout_time - base::TimeTicks::Now();
constexpr int kMaxChannels = 2; constexpr int kMaxChannels = 2;
DCHECK_GE(parameters.channels(), 1); DCHECK_GE(parameters.channels(), 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment