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

Unified Diff: media/audio/audio_output_device_unittest.cc

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/audio/audio_output_device_unittest.cc
diff --git a/media/audio/audio_output_device_unittest.cc b/media/audio/audio_output_device_unittest.cc
index 8133f341f17e9172e5640a8288a34f9e7b7c7cc9..f45d72173ca5c4b75d33d19143b7c5b0c3c4a7c3 100644
--- a/media/audio/audio_output_device_unittest.cc
+++ b/media/audio/audio_output_device_unittest.cc
@@ -35,7 +35,7 @@ class MockRenderCallback : public AudioRendererSink::RenderCallback {
MockRenderCallback() {}
virtual ~MockRenderCallback() {}
- MOCK_METHOD3(Render, int(const std::vector<float*>& audio_data,
+ MOCK_METHOD3(Render, int(AudioBus* audio_bus,
int number_of_frames,
int audio_delay_milliseconds));
MOCK_METHOD0(OnRenderError, void());
@@ -89,15 +89,8 @@ ACTION_P(QuitLoop, loop) {
// Zeros out |number_of_frames| in all channel buffers pointed to by
// the |audio_data| vector.
-void ZeroAudioData(int number_of_frames,
- const std::vector<float*>& audio_data) {
- std::vector<float*>::const_iterator it = audio_data.begin();
- for (; it != audio_data.end(); ++it) {
- float* channel = *it;
- for (int j = 0; j < number_of_frames; ++j) {
- channel[j] = 0.0f;
- }
- }
+void ZeroAudioData(int number_of_frames, AudioBus* audio_bus) {
scherkus (not reviewing) 2012/08/07 23:23:41 if this was an ACTION_P2() you can get rid of all
DaleCurtis 2012/08/08 00:17:58 Actually, I'm not sure I understand what that Zero
scherkus (not reviewing) 2012/08/08 00:49:01 Strange indeed! I'm not sure what's going on here
DaleCurtis 2012/08/08 01:26:07 tommi just added this file I think (git blame conf
+ audio_bus->ZeroFrames(number_of_frames);
}
} // namespace.

Powered by Google App Engine
This is Rietveld 408576698