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

Unified Diff: media/base/audio_pull_fifo.h

Issue 11410012: Collapse AudioRendererMixer and OnMoreDataResampler into AudioTransform. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First draft. Created 8 years, 1 month 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/base/audio_pull_fifo.h
diff --git a/media/base/audio_pull_fifo.h b/media/base/audio_pull_fifo.h
index 9fd3a8e1740c461864cf41dfc6bc0ce83ecc3816..06b7921a4d889ffb821862dc43954d538df7792e 100644
--- a/media/base/audio_pull_fifo.h
+++ b/media/base/audio_pull_fifo.h
@@ -39,6 +39,10 @@ class MEDIA_EXPORT AudioPullFifo {
// Empties the FIFO without deallocating any memory.
void Clear();
+ // Number of output frames already processed. Can be called by ReadCB to
+ // determine the current audio delay due to buffering.
+ int output_frames_ready() { return output_frames_ready_; }
+
private:
// Attempt to fulfill the request using what is available in the FIFO.
// Append new data to the |destination| starting at |write_pos|.
@@ -54,6 +58,8 @@ class MEDIA_EXPORT AudioPullFifo {
// Temporary audio bus to hold the data from the producer.
scoped_ptr<AudioBus> bus_;
+ int output_frames_ready_;
+
DISALLOW_COPY_AND_ASSIGN(AudioPullFifo);
};

Powered by Google App Engine
This is Rietveld 408576698