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 24 matching lines...) Expand all Loading... |
35 kPlatformMac = 4, | 35 kPlatformMac = 4, |
36 kPlatformAndroid = 5, | 36 kPlatformAndroid = 5, |
37 kPlatformIOS = 6 | 37 kPlatformIOS = 6 |
38 }; | 38 }; |
39 | 39 |
40 int32_t CheckPlatform(); | 40 int32_t CheckPlatform(); |
41 int32_t CreatePlatformSpecificObjects(); | 41 int32_t CreatePlatformSpecificObjects(); |
42 int32_t AttachAudioBuffer(); | 42 int32_t AttachAudioBuffer(); |
43 | 43 |
44 AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer); | 44 AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer); |
45 virtual ~AudioDeviceModuleImpl(); | 45 ~AudioDeviceModuleImpl() override; |
46 | 46 |
47 int64_t TimeUntilNextProcess() override; | 47 int64_t TimeUntilNextProcess() override; |
48 void Process() override; | 48 void Process() override; |
49 | 49 |
50 // Retrieve the currently utilized audio layer | 50 // Retrieve the currently utilized audio layer |
51 int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override; | 51 int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override; |
52 | 52 |
53 // Error handling | 53 // Error handling |
54 ErrorCode LastError() const override; | 54 ErrorCode LastError() const override; |
55 int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override; | 55 int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) override; | 171 int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) override; |
172 int32_t RecordingSampleRate(uint32_t* samplesPerSec) const override; | 172 int32_t RecordingSampleRate(uint32_t* samplesPerSec) const override; |
173 int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) override; | 173 int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) override; |
174 int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const override; | 174 int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const override; |
175 | 175 |
176 // Mobile device specific functions | 176 // Mobile device specific functions |
177 int32_t ResetAudioDevice() override; | 177 int32_t ResetAudioDevice() override; |
178 int32_t SetLoudspeakerStatus(bool enable) override; | 178 int32_t SetLoudspeakerStatus(bool enable) override; |
179 int32_t GetLoudspeakerStatus(bool* enabled) const override; | 179 int32_t GetLoudspeakerStatus(bool* enabled) const override; |
180 | 180 |
181 bool BuiltInAECIsEnabled() const override; | |
182 bool BuiltInAECIsAvailable() const override; | 181 bool BuiltInAECIsAvailable() const override; |
183 int32_t EnableBuiltInAEC(bool enable) override; | 182 int32_t EnableBuiltInAEC(bool enable) override; |
184 bool BuiltInAGCIsAvailable() const override; | 183 bool BuiltInAGCIsAvailable() const override; |
185 int32_t EnableBuiltInAGC(bool enable) override; | 184 int32_t EnableBuiltInAGC(bool enable) override; |
186 bool BuiltInNSIsAvailable() const override; | 185 bool BuiltInNSIsAvailable() const override; |
187 int32_t EnableBuiltInNS(bool enable) override; | 186 int32_t EnableBuiltInNS(bool enable) override; |
188 | 187 |
| 188 #if defined(WEBRTC_IOS) |
189 int GetPlayoutAudioParameters(AudioParameters* params) const override; | 189 int GetPlayoutAudioParameters(AudioParameters* params) const override; |
190 int GetRecordAudioParameters(AudioParameters* params) const override; | 190 int GetRecordAudioParameters(AudioParameters* params) const override; |
| 191 #endif // WEBRTC_IOS |
191 | 192 |
192 int32_t Id() { return _id; } | 193 int32_t Id() { return _id; } |
193 #if defined(WEBRTC_ANDROID) | 194 #if defined(WEBRTC_ANDROID) |
194 // Only use this acccessor for test purposes on Android. | 195 // Only use this acccessor for test purposes on Android. |
195 AudioManager* GetAndroidAudioManagerForTest() { | 196 AudioManager* GetAndroidAudioManagerForTest() { |
196 return _audioManagerAndroid.get(); | 197 return _audioManagerAndroid.get(); |
197 } | 198 } |
198 #endif | 199 #endif |
199 AudioDeviceBuffer* GetAudioDeviceBuffer() { return &_audioDeviceBuffer; } | 200 AudioDeviceBuffer* GetAudioDeviceBuffer() { return &_audioDeviceBuffer; } |
200 | 201 |
(...skipping 19 matching lines...) Expand all Loading... |
220 PlatformType _platformType; | 221 PlatformType _platformType; |
221 bool _initialized; | 222 bool _initialized; |
222 mutable ErrorCode _lastError; | 223 mutable ErrorCode _lastError; |
223 }; | 224 }; |
224 | 225 |
225 } // namespace webrtc | 226 } // namespace webrtc |
226 | 227 |
227 #endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) | 228 #endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) |
228 | 229 |
229 #endif // WEBRTC_MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_ | 230 #endif // WEBRTC_MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_ |
OLD | NEW |