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

Unified Diff: media/base/fake_audio_render_callback.cc

Issue 2517503003: Reland: Make more media APIs aware of |delay| and |delay_timestamp| (Closed)
Patch Set: Comments from chcunningham@ and Dale Created 4 years 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/base/fake_audio_render_callback.h ('k') | media/base/fake_audio_renderer_sink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/fake_audio_render_callback.cc
diff --git a/media/base/fake_audio_render_callback.cc b/media/base/fake_audio_render_callback.cc
index 65de1187640f5669553fb8e5946b2cfcca8dc607..030883b21397a636ef9c3ab09c7038f9edba2c13 100644
--- a/media/base/fake_audio_render_callback.cc
+++ b/media/base/fake_audio_render_callback.cc
@@ -7,6 +7,7 @@
#include <cmath>
+#include "media/base/audio_timestamp_helper.h"
#include "media/base/fake_audio_render_callback.h"
namespace media {
@@ -22,9 +23,12 @@ FakeAudioRenderCallback::FakeAudioRenderCallback(double step)
FakeAudioRenderCallback::~FakeAudioRenderCallback() {}
-int FakeAudioRenderCallback::Render(AudioBus* audio_bus,
- uint32_t frames_delayed,
- uint32_t frames_skipped) {
+int FakeAudioRenderCallback::Render(base::TimeDelta delay,
+ base::TimeTicks delay_timestamp,
+ int prior_frames_skipped,
+ AudioBus* audio_bus) {
+ const int kSampleRate = 48000;
+ auto frames_delayed = AudioTimestampHelper::TimeToFrames(delay, kSampleRate);
return RenderInternal(audio_bus, frames_delayed, volume_);
}
« no previous file with comments | « media/base/fake_audio_render_callback.h ('k') | media/base/fake_audio_renderer_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698