Chromium Code Reviews| Index: media/base/audio_pull_fifo.cc |
| diff --git a/media/base/audio_pull_fifo.cc b/media/base/audio_pull_fifo.cc |
| index b1622e0c4110740605d1dd81a5ce8f11f0999aef..584f8cb7ad5adff33c7ed9ede7438c005f5b04d1 100644 |
| --- a/media/base/audio_pull_fifo.cc |
| +++ b/media/base/audio_pull_fifo.cc |
| @@ -11,7 +11,8 @@ |
| namespace media { |
| AudioPullFifo::AudioPullFifo(int channels, int frames, const ReadCB& read_cb) |
| - : read_cb_(read_cb) { |
| + : read_cb_(read_cb), |
| + output_frames_ready_(0) { |
| fifo_.reset(new AudioFifo(channels, frames)); |
| bus_ = AudioBus::Create(channels, frames); |
| } |
| @@ -32,6 +33,8 @@ void AudioPullFifo::Consume(AudioBus* destination, int frames_to_consume) { |
| // Get the remaining audio frames from the producer using the callback. |
| while (remaining_frames_to_provide > 0) { |
| + output_frames_ready_ = write_pos; |
|
scherkus (not reviewing)
2012/11/14 22:43:50
do we need to update output_frames_ready_ anywhere
DaleCurtis
2012/11/15 00:30:59
No, it's not valid to call Clear() during Consume(
|
| + |
| // Fill up the FIFO by acquiring audio data from the producer. |
| read_cb_.Run(bus_.get()); |
| fifo_->Push(bus_.get()); |