OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 virtual int32_t RecordingSampleRate(uint32_t* samplesPerSec) const = 0; | 185 virtual int32_t RecordingSampleRate(uint32_t* samplesPerSec) const = 0; |
186 virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) = 0; | 186 virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) = 0; |
187 virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const = 0; | 187 virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const = 0; |
188 | 188 |
189 // Mobile device specific functions | 189 // Mobile device specific functions |
190 virtual int32_t ResetAudioDevice() = 0; | 190 virtual int32_t ResetAudioDevice() = 0; |
191 virtual int32_t SetLoudspeakerStatus(bool enable) = 0; | 191 virtual int32_t SetLoudspeakerStatus(bool enable) = 0; |
192 virtual int32_t GetLoudspeakerStatus(bool* enabled) const = 0; | 192 virtual int32_t GetLoudspeakerStatus(bool* enabled) const = 0; |
193 | 193 |
194 // Only supported on Android. | 194 // Only supported on Android. |
195 // TODO(henrika): Make pure virtual after updating Chromium. | 195 virtual bool BuiltInAECIsAvailable() const = 0; |
196 virtual bool BuiltInAECIsAvailable() const { return false; } | 196 virtual bool BuiltInAGCIsAvailable() const = 0; |
197 virtual bool BuiltInAGCIsAvailable() const { return false; } | 197 virtual bool BuiltInNSIsAvailable() const = 0; |
198 virtual bool BuiltInNSIsAvailable() const { return false; } | |
199 | 198 |
200 // Enables the built-in audio effects. Only supported on Android. | 199 // Enables the built-in audio effects. Only supported on Android. |
201 // TODO(henrika): Make pure virtual after updating Chromium. | 200 virtual int32_t EnableBuiltInAEC(bool enable) = 0; |
202 virtual int32_t EnableBuiltInAEC(bool enable) { return -1; } | 201 virtual int32_t EnableBuiltInAGC(bool enable) = 0; |
203 virtual int32_t EnableBuiltInAGC(bool enable) { return -1; } | 202 virtual int32_t EnableBuiltInNS(bool enable) = 0; |
204 virtual int32_t EnableBuiltInNS(bool enable) { return -1; } | |
205 // Don't use. | |
206 virtual bool BuiltInAECIsEnabled() const { return false; } | |
207 | 203 |
208 // Only supported on iOS. | 204 // Only supported on iOS. |
209 // TODO(henrika): Make pure virtual after updating Chromium. | 205 #if defined(WEBRTC_IOS) |
210 virtual int GetPlayoutAudioParameters(AudioParameters* params) const { | 206 virtual int GetPlayoutAudioParameters(AudioParameters* params) const; |
211 return -1; | 207 virtual int GetRecordAudioParameters(AudioParameters* params) const; |
212 } | 208 #endif // WEBRTC_IOS |
213 virtual int GetRecordAudioParameters(AudioParameters* params) const { | |
214 return -1; | |
215 } | |
216 | 209 |
217 protected: | 210 protected: |
218 virtual ~AudioDeviceModule() {} | 211 ~AudioDeviceModule() override {} |
219 }; | 212 }; |
220 | 213 |
221 } // namespace webrtc | 214 } // namespace webrtc |
222 | 215 |
223 #endif // MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_ | 216 #endif // MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_ |
OLD | NEW |