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 |
11 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H | 11 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H |
12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H | 12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H |
13 | 13 |
14 #if defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) | 14 #if defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) |
15 | 15 |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
17 #include "webrtc/base/scoped_ptr.h" | 17 #include "webrtc/base/scoped_ptr.h" |
| 18 #include "webrtc/base/scoped_ref_ptr.h" |
18 #include "webrtc/modules/audio_device/audio_device_buffer.h" | 19 #include "webrtc/modules/audio_device/audio_device_buffer.h" |
19 #include "webrtc/modules/audio_device/include/audio_device.h" | 20 #include "webrtc/modules/audio_device/include/audio_device.h" |
20 | 21 |
21 namespace webrtc { | 22 namespace webrtc { |
22 | 23 |
23 class AudioDeviceGeneric; | 24 class AudioDeviceGeneric; |
24 class AudioManager; | 25 class AudioManager; |
25 class CriticalSectionWrapper; | 26 class CriticalSectionWrapper; |
26 | 27 |
27 class AudioDeviceModuleImpl : public AudioDeviceModule { | 28 class AudioDeviceModuleImpl : public AudioDeviceModule { |
(...skipping 12 matching lines...) Expand all Loading... |
40 int32_t CreatePlatformSpecificObjects(); | 41 int32_t CreatePlatformSpecificObjects(); |
41 int32_t AttachAudioBuffer(); | 42 int32_t AttachAudioBuffer(); |
42 | 43 |
43 AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer); | 44 AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer); |
44 virtual ~AudioDeviceModuleImpl(); | 45 virtual ~AudioDeviceModuleImpl(); |
45 | 46 |
46 int64_t TimeUntilNextProcess() override; | 47 int64_t TimeUntilNextProcess() override; |
47 int32_t Process() override; | 48 int32_t Process() override; |
48 | 49 |
49 // Factory methods (resource allocation/deallocation) | 50 // Factory methods (resource allocation/deallocation) |
50 static AudioDeviceModule* Create( | 51 static rtc::scoped_refptr<AudioDeviceModule> Create( |
51 const int32_t id, | 52 const int32_t id, |
52 const AudioLayer audioLayer = kPlatformDefaultAudio); | 53 const AudioLayer audioLayer = kPlatformDefaultAudio); |
53 | 54 |
54 // Retrieve the currently utilized audio layer | 55 // Retrieve the currently utilized audio layer |
55 int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override; | 56 int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override; |
56 | 57 |
57 // Error handling | 58 // Error handling |
58 ErrorCode LastError() const override; | 59 ErrorCode LastError() const override; |
59 int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override; | 60 int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override; |
60 | 61 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 PlatformType _platformType; | 225 PlatformType _platformType; |
225 bool _initialized; | 226 bool _initialized; |
226 mutable ErrorCode _lastError; | 227 mutable ErrorCode _lastError; |
227 }; | 228 }; |
228 | 229 |
229 } // namespace webrtc | 230 } // namespace webrtc |
230 | 231 |
231 #endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) | 232 #endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) |
232 | 233 |
233 #endif // WEBRTC_MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_ | 234 #endif // WEBRTC_MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_ |
OLD | NEW |