Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1072)

Unified Diff: media/audio/audio_output_stream_sink.cc

Issue 2437863004: Make more media APIs aware of |delay| and |delay_timestamp| (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/audio/audio_output_stream_sink.cc
diff --git a/media/audio/audio_output_stream_sink.cc b/media/audio/audio_output_stream_sink.cc
index 5bb2f8e39d984679930a7e451da21e75a36d286e..639986db50cfed0c306b75fe2a0c86bf59b24442 100644
--- a/media/audio/audio_output_stream_sink.cc
+++ b/media/audio/audio_output_stream_sink.cc
@@ -85,7 +85,7 @@ bool AudioOutputStreamSink::CurrentThreadIsRenderingThread() {
}
int AudioOutputStreamSink::OnMoreData(base::TimeDelta delay,
- base::TimeTicks /* delay_timestamp */,
+ base::TimeTicks delay_timestamp,
int prior_frames_skipped,
AudioBus* dest) {
// Note: Runs on the audio thread created by the OS.
@@ -93,10 +93,7 @@ int AudioOutputStreamSink::OnMoreData(base::TimeDelta delay,
if (!active_render_callback_)
return 0;
- uint32_t frames_delayed =
- AudioTimestampHelper::TimeToFrames(delay, active_params_.sample_rate());
-
- return active_render_callback_->Render(dest, frames_delayed,
+ return active_render_callback_->Render(dest, delay, delay_timestamp,
prior_frames_skipped);
}

Powered by Google App Engine
This is Rietveld 408576698