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

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: Added implementation for ALSA. Created 4 years, 5 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 fde0509d979f0dc24aa45a062620d7583425738b..8de5de6c0fb959f609f13b2b000e383c0b84bf1a 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_++;
@@ -203,7 +204,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.
@@ -260,7 +262,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