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

Unified Diff: media/audio/audio_output_stream_sink.cc

Issue 2452183003: Revert of 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
« no previous file with comments | « media/audio/audio_output_device_unittest.cc ('k') | media/audio/clockless_audio_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 17ad0735397ff0c3a2c0a4bdb4fabd0a99c76c6f..5bb2f8e39d984679930a7e451da21e75a36d286e 100644
--- a/media/audio/audio_output_stream_sink.cc
+++ b/media/audio/audio_output_stream_sink.cc
@@ -85,7 +85,7 @@
}
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,8 +93,11 @@
if (!active_render_callback_)
return 0;
- return active_render_callback_->Render(delay, delay_timestamp,
- prior_frames_skipped, dest);
+ uint32_t frames_delayed =
+ AudioTimestampHelper::TimeToFrames(delay, active_params_.sample_rate());
+
+ return active_render_callback_->Render(dest, frames_delayed,
+ prior_frames_skipped);
}
void AudioOutputStreamSink::OnError(AudioOutputStream* stream) {
« no previous file with comments | « media/audio/audio_output_device_unittest.cc ('k') | media/audio/clockless_audio_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698