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

Unified Diff: media/base/audio_block_fifo.h

Issue 396263004: Switch the input code to use AudioBlockFifo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/base/audio_block_fifo.h
diff --git a/media/base/audio_block_fifo.h b/media/base/audio_block_fifo.h
index d3d5a8ac240a6e466a0e93d44b50d000480efbd3..2fca65375874393fb6be6c327338e417a8cdc51f 100644
--- a/media/base/audio_block_fifo.h
+++ b/media/base/audio_block_fifo.h
@@ -39,6 +39,11 @@ class MEDIA_EXPORT AudioBlockFifo {
// Number of available block of memory ready to be consumed in the FIFO.
int available_blocks() const { return available_blocks_; }
+ // Number of available frames of data in the FIFO.
+ int available_frames() const {
+ return available_blocks_ * block_frames_ + write_pos_;
DaleCurtis 2014/07/18 18:21:54 Needs to be non-hacker style since it's doing math
no longer working on chromium 2014/07/21 15:13:30 Thanks, I forgot it again. Done.
+ }
+
// Number of unfilled frames in the whole FIFO.
int GetUnfilledFrames() const;

Powered by Google App Engine
This is Rietveld 408576698