Commit cd50f566 authored by xians@chromium.org's avatar xians@chromium.org

Fixing the webrtc local audio renderer timer between Stop() and Start().

After calling Stop(), the timer should just stop.


BUG=244192
TEST= https://webrtc.googlecode.com/svn/trunk/samples/js/demos/html/local-audio-rendering.html
Calling Start/Stop, the timer used to start/stop counting.

Review URL: https://chromiumcodereview.appspot.com/16045004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202419 0039d316-1c4b-4281-b951-d872f2087c98
parent c2797431
......@@ -28,10 +28,6 @@ int WebRtcLocalAudioRenderer::Render(
TRACE_EVENT0("audio", "WebRtcLocalAudioRenderer::Render");
base::Time now = base::Time::Now();
total_render_time_ += now - last_render_time_;
last_render_time_ = now;
DCHECK(loopback_fifo_.get() != NULL);
// Provide data by reading from the FIFO if the FIFO contains enough
......@@ -74,6 +70,10 @@ void WebRtcLocalAudioRenderer::CaptureData(const int16* audio_data,
audio_source->frames(),
sizeof(audio_data[0]));
loopback_fifo_->Push(audio_source.get());
base::Time now = base::Time::Now();
total_render_time_ += now - last_render_time_;
last_render_time_ = now;
} else {
DVLOG(1) << "FIFO is full";
}
......
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