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

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: Gotta catch'em all! 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
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..19a810c5e9db9665ceb5e83dd7f40553c32b5e2b 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,15 @@ class MEDIA_EXPORT AudioRendererMixer
FRIEND_TEST_ALL_PREFIXES(AudioRendererMixerTest, VectorFMACBenchmark);
// AudioRendererSink::RenderCallback implementation.
- virtual int Render(const std::vector<float*>& audio_data,
+ virtual int Render(AudioBus* audio_bus,
int number_of_frames,
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
+ // |audio_bus|. 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, int number_of_frames);
// 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 +66,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_;

Powered by Google App Engine
This is Rietveld 408576698