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

Unified Diff: media/audio/audio_io.h

Issue 1487983002: 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: 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
Index: media/audio/audio_io.h
diff --git a/media/audio/audio_io.h b/media/audio/audio_io.h
index 56392154e3229a062a77fd8b1d9ba12090558bca..76cb652eee7563f0a183352f7d00f6f975b5de2d 100644
--- a/media/audio/audio_io.h
+++ b/media/audio/audio_io.h
@@ -63,6 +63,12 @@ class MEDIA_EXPORT AudioOutputStream {
// number of bytes of delay buffered by the AudioOutputStream.
virtual int OnMoreData(AudioBus* dest, uint32 total_bytes_delay) = 0;
+ // Informs that the consumer has skipped |frames_skipped| frames. The source
DaleCurtis 2015/12/01 18:12:46 Why a new method instead of rolling this into OnMo
Henrik Grunell 2015/12/03 17:01:06 (See previous comment exchange.) Put this in OnMor
+ // can handle this appropriately depending on the type of source. An
+ // ordinary file playout would ignore this.
+ // TODO BEFORE COMMIT: Pure virtual and update subclasses.
+ virtual void OnSkippedData(uint32_t frames_skipped){};
+
// There was an error while playing a buffer. Audio source cannot be
// destroyed yet. No direct action needed by the AudioStream, but it is
// a good place to stop accumulating sound data since is is likely that

Powered by Google App Engine
This is Rietveld 408576698