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

Side by Side Diff: content/renderer/media/webrtc_audio_device_impl.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector>
10 9
11 #include "base/basictypes.h" 10 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
15 #include "base/message_loop_proxy.h" 14 #include "base/message_loop_proxy.h"
16 #include "base/time.h" 15 #include "base/time.h"
17 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
18 #include "media/audio/audio_input_device.h" 17 #include "media/audio/audio_input_device.h"
19 #include "media/base/audio_renderer_sink.h" 18 #include "media/base/audio_renderer_sink.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // Methods called on main render thread. 210 // Methods called on main render thread.
212 WebRtcAudioDeviceImpl(); 211 WebRtcAudioDeviceImpl();
213 212
214 // webrtc::RefCountedModule implementation. 213 // webrtc::RefCountedModule implementation.
215 // The creator must call AddRef() after construction and use Release() 214 // The creator must call AddRef() after construction and use Release()
216 // to release the reference and delete this object. 215 // to release the reference and delete this object.
217 virtual int32_t AddRef() OVERRIDE; 216 virtual int32_t AddRef() OVERRIDE;
218 virtual int32_t Release() OVERRIDE; 217 virtual int32_t Release() OVERRIDE;
219 218
220 // media::AudioRendererSink::RenderCallback implementation. 219 // media::AudioRendererSink::RenderCallback implementation.
221 virtual int Render(const std::vector<float*>& audio_data, 220 virtual int Render(media::AudioBus* audio_bus,
222 int number_of_frames,
223 int audio_delay_milliseconds) OVERRIDE; 221 int audio_delay_milliseconds) OVERRIDE;
224 virtual void OnRenderError() OVERRIDE; 222 virtual void OnRenderError() OVERRIDE;
225 223
226 // AudioInputDevice::CaptureCallback implementation. 224 // AudioInputDevice::CaptureCallback implementation.
227 virtual void Capture(const std::vector<float*>& audio_data, 225 virtual void Capture(media::AudioBus* audio_bus,
228 int number_of_frames,
229 int audio_delay_milliseconds, 226 int audio_delay_milliseconds,
230 double volume) OVERRIDE; 227 double volume) OVERRIDE;
231 virtual void OnCaptureError() OVERRIDE; 228 virtual void OnCaptureError() OVERRIDE;
232 229
233 // AudioInputDevice::CaptureEventHandler implementation. 230 // AudioInputDevice::CaptureEventHandler implementation.
234 virtual void OnDeviceStarted(const std::string& device_id) OVERRIDE; 231 virtual void OnDeviceStarted(const std::string& device_id) OVERRIDE;
235 virtual void OnDeviceStopped() OVERRIDE; 232 virtual void OnDeviceStopped() OVERRIDE;
236 233
237 // webrtc::Module implementation. 234 // webrtc::Module implementation.
238 virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE; 235 virtual int32_t ChangeUniqueId(const int32_t id) OVERRIDE;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 bool agc_is_enabled_; 442 bool agc_is_enabled_;
446 443
447 // Used for histograms of total recording and playout times. 444 // Used for histograms of total recording and playout times.
448 base::Time start_capture_time_; 445 base::Time start_capture_time_;
449 base::Time start_render_time_; 446 base::Time start_render_time_;
450 447
451 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); 448 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl);
452 }; 449 };
453 450
454 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ 451 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_webaudiodevice_impl.cc ('k') | content/renderer/media/webrtc_audio_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698