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

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: Rename. Comments. 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
« no previous file with comments | « media/base/fake_audio_render_callback.cc ('k') | media/base/multi_channel_resampler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6dd565b1b93a8ae17002db50c9f90695a6f0cba3 100644
--- a/media/base/multi_channel_resampler.h
+++ b/media/base/multi_channel_resampler.h
@@ -21,8 +21,9 @@ class MEDIA_EXPORT MultiChannelResampler {
public:
// Callback type for providing more data into the resampler. Expects AudioBus
// to be completely filled with data upon return; zero padded if not enough
- // frames are available to satisfy the request.
- typedef base::Callback<void(AudioBus* audio_bus)> ReadCB;
+ // frames are available to satisfy the request. |frame_delay| is the number
+ // of output frames already processed and can be used to estimate delay.
+ typedef base::Callback<void(int frame_delay, AudioBus* audio_bus)> ReadCB;
// Constructs a MultiChannelResampler with the specified |read_cb|, which is
// used to acquire audio data for resampling. |io_sample_rate_ratio| is the
@@ -56,6 +57,12 @@ 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_;
+
+ DISALLOW_COPY_AND_ASSIGN(MultiChannelResampler);
};
} // namespace media
« no previous file with comments | « media/base/fake_audio_render_callback.cc ('k') | media/base/multi_channel_resampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698