Index: media/base/audio_block_fifo.h |
diff --git a/media/base/audio_block_fifo.h b/media/base/audio_block_fifo.h |
index a90a3dfe65661a3b089f517703c53d9de6c18f78..8c0d5f5cccdc8f660078c94ef21ce00f8504ba42 100644 |
--- a/media/base/audio_block_fifo.h |
+++ b/media/base/audio_block_fifo.h |
@@ -29,6 +29,9 @@ class MEDIA_EXPORT AudioBlockFifo { |
// Push() will crash if the allocated space is insufficient. |
void Push(const void* source, int frames, int bytes_per_sample); |
+ // Pushes zeroed out frames to the FIFO. |
+ void PushSilence(int frames); |
+ |
// Consumes a block of audio from the FIFO. Returns an AudioBus which |
// contains the consumed audio data to avoid copying. |
// Consume() will crash if the FIFO does not contain a block of data. |
@@ -50,6 +53,11 @@ class MEDIA_EXPORT AudioBlockFifo { |
void IncreaseCapacity(int blocks); |
private: |
+ // Common implementation for Push() and PushSilence. if |source| is nullptr, |
+ // silence will be pushed. To push silence, set source and bytes_per_sample to |
+ // nullptr and 0 respectively. |
+ void PushInternal(const void* source, int frames, int bytes_per_sample); |
+ |
// The actual FIFO is a vector of audio buses. |
ScopedVector<AudioBus> audio_blocks_; |