OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_ |
12 #define WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_ | 12 #define WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_ |
13 | 13 |
14 #include "webrtc/modules/audio_device/include/audio_device.h" | 14 #include "webrtc/modules/audio_device/include/audio_device.h" |
15 | 15 |
16 namespace webrtc { | 16 namespace webrtc { |
17 | 17 |
18 class FakeAudioDeviceModule : public AudioDeviceModule { | 18 class FakeAudioDeviceModule : public AudioDeviceModule { |
19 public: | 19 public: |
20 FakeAudioDeviceModule() {} | 20 FakeAudioDeviceModule() {} |
21 virtual ~FakeAudioDeviceModule() {} | 21 virtual ~FakeAudioDeviceModule() {} |
22 virtual int32_t AddRef() const { return 0; } | 22 virtual int32_t AddRef() const { return 0; } |
23 virtual int32_t Release() const { return 0; } | 23 virtual int32_t Release() const { return 0; } |
| 24 |
| 25 private: |
24 virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) { | 26 virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) { |
25 return 0; | 27 return 0; |
26 } | 28 } |
27 virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) { | 29 virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) { |
28 return 0; | 30 return 0; |
29 } | 31 } |
30 virtual int32_t Init() { return 0; } | 32 virtual int32_t Init() { return 0; } |
31 virtual int32_t InitSpeaker() { return 0; } | 33 virtual int32_t InitSpeaker() { return 0; } |
32 virtual int32_t SetPlayoutDevice(uint16_t index) { return 0; } | 34 virtual int32_t SetPlayoutDevice(uint16_t index) { return 0; } |
33 virtual int32_t SetPlayoutDevice(WindowsDeviceType device) { return 0; } | 35 virtual int32_t SetPlayoutDevice(WindowsDeviceType device) { return 0; } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 virtual int32_t StereoRecording(bool* enabled) const { return 0; } | 116 virtual int32_t StereoRecording(bool* enabled) const { return 0; } |
115 virtual int32_t SetRecordingChannel(const ChannelType channel) { return 0; } | 117 virtual int32_t SetRecordingChannel(const ChannelType channel) { return 0; } |
116 virtual int32_t RecordingChannel(ChannelType* channel) const { return 0; } | 118 virtual int32_t RecordingChannel(ChannelType* channel) const { return 0; } |
117 virtual int32_t SetPlayoutBuffer(const BufferType type, | 119 virtual int32_t SetPlayoutBuffer(const BufferType type, |
118 uint16_t sizeMS = 0) { | 120 uint16_t sizeMS = 0) { |
119 return 0; | 121 return 0; |
120 } | 122 } |
121 virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const { | 123 virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const { |
122 return 0; | 124 return 0; |
123 } | 125 } |
124 virtual int32_t PlayoutDelay(uint16_t* delayMS) const { return 0; } | 126 virtual int32_t PlayoutDelay(uint16_t* delayMS) const { |
| 127 *delayMS = 0; |
| 128 return 0; |
| 129 } |
125 virtual int32_t RecordingDelay(uint16_t* delayMS) const { return 0; } | 130 virtual int32_t RecordingDelay(uint16_t* delayMS) const { return 0; } |
126 virtual int32_t CPULoad(uint16_t* load) const { return 0; } | 131 virtual int32_t CPULoad(uint16_t* load) const { return 0; } |
127 virtual int32_t StartRawOutputFileRecording( | 132 virtual int32_t StartRawOutputFileRecording( |
128 const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { | 133 const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { |
129 return 0; | 134 return 0; |
130 } | 135 } |
131 virtual int32_t StopRawOutputFileRecording() { return 0; } | 136 virtual int32_t StopRawOutputFileRecording() { return 0; } |
132 virtual int32_t StartRawInputFileRecording( | 137 virtual int32_t StartRawInputFileRecording( |
133 const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { | 138 const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { |
134 return 0; | 139 return 0; |
(...skipping 25 matching lines...) Expand all Loading... |
160 } | 165 } |
161 virtual int GetRecordAudioParameters(AudioParameters* params) const { | 166 virtual int GetRecordAudioParameters(AudioParameters* params) const { |
162 return -1; | 167 return -1; |
163 } | 168 } |
164 #endif // WEBRTC_IOS | 169 #endif // WEBRTC_IOS |
165 }; | 170 }; |
166 | 171 |
167 } // namespace webrtc | 172 } // namespace webrtc |
168 | 173 |
169 #endif // WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_ | 174 #endif // WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_FAKE_AUDIO_DEVICE_H_ |
OLD | NEW |