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

Unified Diff: media/base/audio_block_fifo.h

Issue 557693003: Dynamically allocate more memory to AudioBlockFifo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed the comments. Created 6 years, 3 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
« no previous file with comments | « media/audio/pulse/pulse_input.cc ('k') | media/base/audio_block_fifo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_block_fifo.h
diff --git a/media/base/audio_block_fifo.h b/media/base/audio_block_fifo.h
index fdb5cef6225664dc81974a30764c1bee983813c4..94786b9eb5c270b0575d51fce0ca9ddcca864553 100644
--- a/media/base/audio_block_fifo.h
+++ b/media/base/audio_block_fifo.h
@@ -45,10 +45,16 @@ class MEDIA_EXPORT AudioBlockFifo {
// Number of unfilled frames in the whole FIFO.
int GetUnfilledFrames() const;
+ // Dynamically increase |blocks| of memory to the FIFO.
+ void IncreaseCapacity(int blocks);
+
private:
// The actual FIFO is a vector of audio buses.
ScopedVector<AudioBus> audio_blocks_;
+ // Number of channels in AudioBus.
+ const int channels_;
+
// Maximum number of frames of data one block of memory can contain.
// This value is set by |frames| in the constructor.
const int block_frames_;
« no previous file with comments | « media/audio/pulse/pulse_input.cc ('k') | media/base/audio_block_fifo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698