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

Unified Diff: media/audio/simple_sources.cc

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implementation of 'AudioContext.getOutputTimestamp' method Created 4 years, 6 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/simple_sources.cc
diff --git a/media/audio/simple_sources.cc b/media/audio/simple_sources.cc
index f20343a4ee49c6c8bb25bc99e8a3d79e1d4189d2..efca80ce862c72d9dbdb4282b73b115697e248c7 100644
--- a/media/audio/simple_sources.cc
+++ b/media/audio/simple_sources.cc
@@ -117,7 +117,8 @@ SineWaveAudioSource::~SineWaveAudioSource() {
// but it is efficient enough for our simple needs.
int SineWaveAudioSource::OnMoreData(AudioBus* audio_bus,
uint32_t total_bytes_delay,
- uint32_t frames_skipped) {
+ uint32_t frames_skipped,
+ const AudioTimestamp& timestamp) {
base::AutoLock auto_lock(time_lock_);
callbacks_++;
@@ -202,7 +203,8 @@ void FileSource::LoadWavFile(const base::FilePath& path_to_wav_file) {
int FileSource::OnMoreData(AudioBus* audio_bus,
uint32_t total_bytes_delay,
- uint32_t frames_skipped) {
+ uint32_t frames_skipped,
+ const AudioTimestamp& timestamp) {
// Load the file if we haven't already. This load needs to happen on the
// audio thread, otherwise we'll run on the UI thread on Mac for instance.
// This will massively delay the first OnMoreData, but we'll catch up.
@@ -252,7 +254,8 @@ BeepingSource::~BeepingSource() {
int BeepingSource::OnMoreData(AudioBus* audio_bus,
uint32_t total_bytes_delay,
- uint32_t frames_skipped) {
+ uint32_t frames_skipped,
+ const AudioTimestamp& timestamp) {
// Accumulate the time from the last beep.
interval_from_last_beep_ += base::TimeTicks::Now() - last_callback_time_;

Powered by Google App Engine
This is Rietveld 408576698