OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 virtual int32_t AddRef() OVERRIDE; | 108 virtual int32_t AddRef() OVERRIDE; |
109 virtual int32_t Release() OVERRIDE; | 109 virtual int32_t Release() OVERRIDE; |
110 | 110 |
111 // We need this one to support runnable method tasks. | 111 // We need this one to support runnable method tasks. |
112 static bool ImplementsThreadSafeReferenceCounting() { return true; } | 112 static bool ImplementsThreadSafeReferenceCounting() { return true; } |
113 | 113 |
114 // AudioDevice::RenderCallback implementation. | 114 // AudioDevice::RenderCallback implementation. |
115 virtual size_t Render(const std::vector<float*>& audio_data, | 115 virtual size_t Render(const std::vector<float*>& audio_data, |
116 size_t number_of_frames, | 116 size_t number_of_frames, |
117 size_t audio_delay_milliseconds) OVERRIDE; | 117 size_t audio_delay_milliseconds) OVERRIDE; |
| 118 virtual void OnError() OVERRIDE; |
118 | 119 |
119 // AudioInputDevice::CaptureCallback implementation. | 120 // AudioInputDevice::CaptureCallback implementation. |
120 virtual void Capture(const std::vector<float*>& audio_data, | 121 virtual void Capture(const std::vector<float*>& audio_data, |
121 size_t number_of_frames, | 122 size_t number_of_frames, |
122 size_t audio_delay_milliseconds) OVERRIDE; | 123 size_t audio_delay_milliseconds) OVERRIDE; |
123 | 124 |
124 // AudioInputDevice::CaptureEventHandler implementation. | 125 // AudioInputDevice::CaptureEventHandler implementation. |
125 virtual void OnDeviceStarted(const std::string& device_id) OVERRIDE; | 126 virtual void OnDeviceStarted(const std::string& device_id) OVERRIDE; |
126 virtual void OnDeviceStopped() OVERRIDE; | 127 virtual void OnDeviceStopped() OVERRIDE; |
127 | 128 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 int bytes_per_sample_; | 329 int bytes_per_sample_; |
329 | 330 |
330 bool initialized_; | 331 bool initialized_; |
331 bool playing_; | 332 bool playing_; |
332 bool recording_; | 333 bool recording_; |
333 | 334 |
334 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); | 335 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); |
335 }; | 336 }; |
336 | 337 |
337 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 338 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
OLD | NEW |