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

Unified Diff: media/base/audio_renderer_mixer.h

Issue 10823175: Switch AudioRenderSink::Callback to use AudioBus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup MCR AudioBus usage. Created 8 years, 4 months 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/audio/null_audio_sink.cc ('k') | media/base/audio_renderer_mixer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_renderer_mixer.h
diff --git a/media/base/audio_renderer_mixer.h b/media/base/audio_renderer_mixer.h
index d293799266440e9885e37e0ef927ddde14c77bf8..75b7d85d6ec8f7e1e74e6f2d60008cbbcd081b6e 100644
--- a/media/base/audio_renderer_mixer.h
+++ b/media/base/audio_renderer_mixer.h
@@ -6,7 +6,6 @@
#define MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
#include <set>
-#include <vector>
#include "base/gtest_prod_util.h"
#include "base/synchronization/lock.h"
@@ -38,16 +37,14 @@ class MEDIA_EXPORT AudioRendererMixer
FRIEND_TEST_ALL_PREFIXES(AudioRendererMixerTest, VectorFMACBenchmark);
// AudioRendererSink::RenderCallback implementation.
- virtual int Render(const std::vector<float*>& audio_data,
- int number_of_frames,
+ virtual int Render(AudioBus* audio_bus,
int audio_delay_milliseconds) OVERRIDE;
virtual void OnRenderError() OVERRIDE;
- // Handles mixing and volume adjustment. Renders |number_of_frames| into
- // |audio_data|. When resampling is necessary, ProvideInput() will be called
+ // Handles mixing and volume adjustment. Fully fills |audio_bus| with mixed
+ // audio data. When resampling is necessary, ProvideInput() will be called
// by MultiChannelResampler when more data is necessary.
- void ProvideInput(const std::vector<float*>& audio_data,
- int number_of_frames);
+ void ProvideInput(AudioBus* audio_bus);
// Multiply each element of |src| (up to |len|) by |scale| and add to |dest|.
static void VectorFMAC(const float src[], float scale, int len, float dest[]);
@@ -68,8 +65,7 @@ class MEDIA_EXPORT AudioRendererMixer
base::Lock mixer_inputs_lock_;
// Vector for rendering audio data from each mixer input.
- int mixer_input_audio_data_size_;
- std::vector<float*> mixer_input_audio_data_;
+ scoped_ptr<AudioBus> mixer_input_audio_bus_;
// Handles resampling post-mixing.
scoped_ptr<MultiChannelResampler> resampler_;
« no previous file with comments | « media/audio/null_audio_sink.cc ('k') | media/base/audio_renderer_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698