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

Unified Diff: media/base/multi_channel_resampler.h

Issue 11410012: Collapse AudioRendererMixer and OnMoreDataResampler into AudioTransform. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First draft. Created 8 years, 1 month 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/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

Powered by Google App Engine
This is Rietveld 408576698