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

Side by Side Diff: media/audio/audio_input_device.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
« no previous file with comments | « media/audio/audio_device_thread.cc ('k') | media/audio/audio_input_device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Low-latency audio capturing class utilizing audio input stream provided 5 // Low-latency audio capturing class utilizing audio input stream provided
6 // by a server (browser) process by use of an IPC interface. 6 // by a server (browser) process by use of an IPC interface.
7 // 7 //
8 // Relationship of classes: 8 // Relationship of classes:
9 // 9 //
10 // AudioInputController AudioInputDevice 10 // AudioInputController AudioInputDevice
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // TODO(henrika): Add support for event handling (e.g. OnStateChanged, 81 // TODO(henrika): Add support for event handling (e.g. OnStateChanged,
82 // OnCaptureStopped etc.) and ensure that we can deliver these notifications 82 // OnCaptureStopped etc.) and ensure that we can deliver these notifications
83 // to any clients using this class. 83 // to any clients using this class.
84 class MEDIA_EXPORT AudioInputDevice 84 class MEDIA_EXPORT AudioInputDevice
85 : NON_EXPORTED_BASE(public AudioInputIPCDelegate), 85 : NON_EXPORTED_BASE(public AudioInputIPCDelegate),
86 NON_EXPORTED_BASE(public ScopedLoopObserver), 86 NON_EXPORTED_BASE(public ScopedLoopObserver),
87 public base::RefCountedThreadSafe<AudioInputDevice> { 87 public base::RefCountedThreadSafe<AudioInputDevice> {
88 public: 88 public:
89 class MEDIA_EXPORT CaptureCallback { 89 class MEDIA_EXPORT CaptureCallback {
90 public: 90 public:
91 virtual void Capture(const std::vector<float*>& audio_data, 91 virtual void Capture(AudioBus* audio_bus,
92 int number_of_frames,
93 int audio_delay_milliseconds, 92 int audio_delay_milliseconds,
94 double volume) = 0; 93 double volume) = 0;
95 virtual void OnCaptureError() = 0; 94 virtual void OnCaptureError() = 0;
96 protected: 95 protected:
97 virtual ~CaptureCallback(); 96 virtual ~CaptureCallback();
98 }; 97 };
99 98
100 class MEDIA_EXPORT CaptureEventHandler { 99 class MEDIA_EXPORT CaptureEventHandler {
101 public: 100 public:
102 // Notification to the client that the device with the specific |device_id| 101 // Notification to the client that the device with the specific |device_id|
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 base::Lock audio_thread_lock_; 201 base::Lock audio_thread_lock_;
203 AudioDeviceThread audio_thread_; 202 AudioDeviceThread audio_thread_;
204 scoped_ptr<AudioInputDevice::AudioThreadCallback> audio_callback_; 203 scoped_ptr<AudioInputDevice::AudioThreadCallback> audio_callback_;
205 204
206 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); 205 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice);
207 }; 206 };
208 207
209 } // namespace media 208 } // namespace media
210 209
211 #endif // MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_ 210 #endif // MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_
OLDNEW
« no previous file with comments | « media/audio/audio_device_thread.cc ('k') | media/audio/audio_input_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698