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

Unified Diff: media/audio/simple_sources.cc

Issue 1538563002: Forward the number of skipped frames by the OS in audio playout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fix. git cl format. Rebase. Created 5 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/audio/simple_sources.h ('k') | media/audio/simple_sources_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/simple_sources.cc
diff --git a/media/audio/simple_sources.cc b/media/audio/simple_sources.cc
index 4ded6bd40dd90f682de4e5447638bdb6ef9f2aaf..b75b96d9ea2933969f1296506c7a202ac641d6dc 100644
--- a/media/audio/simple_sources.cc
+++ b/media/audio/simple_sources.cc
@@ -110,7 +110,8 @@ SineWaveAudioSource::~SineWaveAudioSource() {
// The implementation could be more efficient if a lookup table is constructed
// but it is efficient enough for our simple needs.
int SineWaveAudioSource::OnMoreData(AudioBus* audio_bus,
- uint32 total_bytes_delay) {
+ uint32_t total_bytes_delay,
+ uint32_t frames_skipped) {
base::AutoLock auto_lock(time_lock_);
callbacks_++;
@@ -193,7 +194,9 @@ void FileSource::LoadWavFile(const base::FilePath& path_to_wav_file) {
file_audio_converter_->AddInput(this);
}
-int FileSource::OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) {
+int FileSource::OnMoreData(AudioBus* audio_bus,
+ uint32_t total_bytes_delay,
+ uint32_t frames_skipped) {
// 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.
@@ -242,7 +245,9 @@ BeepingSource::BeepingSource(const AudioParameters& params)
BeepingSource::~BeepingSource() {
}
-int BeepingSource::OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) {
+int BeepingSource::OnMoreData(AudioBus* audio_bus,
+ uint32_t total_bytes_delay,
+ uint32_t frames_skipped) {
// Accumulate the time from the last beep.
interval_from_last_beep_ += base::TimeTicks::Now() - last_callback_time_;
« no previous file with comments | « media/audio/simple_sources.h ('k') | media/audio/simple_sources_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698