Chromium Code Reviews| Index: media/base/multi_channel_resampler.h |
| diff --git a/media/base/multi_channel_resampler.h b/media/base/multi_channel_resampler.h |
| index 748bb47d725d421eadaa8f2cf624032f08b2e028..c4191c046c5ad41b2d2d96934992409c27e296e8 100644 |
| --- a/media/base/multi_channel_resampler.h |
| +++ b/media/base/multi_channel_resampler.h |
| @@ -37,6 +37,10 @@ class MEDIA_EXPORT MultiChannelResampler { |
| // Flush all buffered data and reset internal indices. |
| void Flush(); |
| + // 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_; } |
|
miu
2012/11/12 20:51:59
This appears to be monotonically increasing. The
DaleCurtis
2012/11/12 21:23:53
It is not monotonically increasing. It is reset to
|
| + |
| private: |
| // SincResampler::ReadCB implementation. ProvideInput() will be called for |
| // each channel (in channel order) as SincResampler needs more data. |
| @@ -56,6 +60,10 @@ class MEDIA_EXPORT MultiChannelResampler { |
| scoped_ptr<AudioBus> resampler_audio_bus_; |
| scoped_ptr<AudioBus> wrapped_resampler_audio_bus_; |
| std::vector<float*> resampler_audio_data_; |
| + |
| + // The number of output frames that have successfully been processed during |
| + // the current Resample() call. |
| + int output_frames_ready_; |
| }; |
|
scherkus (not reviewing)
2012/11/14 22:43:50
missing DISALLOW_...
DaleCurtis
2012/11/16 23:51:05
Done.
|
| } // namespace media |