| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 kChannelRight = 1, | 45 kChannelRight = 1, |
| 46 kChannelBoth = 2 | 46 kChannelBoth = 2 |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 public: | 49 public: |
| 50 // Create an ADM. | 50 // Create an ADM. |
| 51 static rtc::scoped_refptr<AudioDeviceModule> Create( | 51 static rtc::scoped_refptr<AudioDeviceModule> Create( |
| 52 const int32_t id, | 52 const int32_t id, |
| 53 const AudioLayer audio_layer); | 53 const AudioLayer audio_layer); |
| 54 | 54 |
| 55 // TODO(solenberg): Remove temporary implementation of Module interface. |
| 56 int64_t TimeUntilNextProcess() override { |
| 57 // Make sure Process() isn't called very often. |
| 58 return 1000000; |
| 59 } |
| 60 void Process() override {} |
| 61 |
| 55 // Retrieve the currently utilized audio layer | 62 // Retrieve the currently utilized audio layer |
| 56 virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0; | 63 virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0; |
| 57 | 64 |
| 58 // Error handling | 65 // Error handling |
| 59 virtual ErrorCode LastError() const = 0; | 66 virtual ErrorCode LastError() const = 0; |
| 60 virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) = 0; | 67 virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) { |
| 68 return 0; |
| 69 } |
| 61 | 70 |
| 62 // Full-duplex transportation of PCM audio | 71 // Full-duplex transportation of PCM audio |
| 63 virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) = 0; | 72 virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) = 0; |
| 64 | 73 |
| 65 // Main initialization and termination | 74 // Main initialization and termination |
| 66 virtual int32_t Init() = 0; | 75 virtual int32_t Init() = 0; |
| 67 virtual int32_t Terminate() = 0; | 76 virtual int32_t Terminate() = 0; |
| 68 virtual bool Initialized() const = 0; | 77 virtual bool Initialized() const = 0; |
| 69 | 78 |
| 70 // Device enumeration | 79 // Device enumeration |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 virtual int GetRecordAudioParameters(AudioParameters* params) const = 0; | 182 virtual int GetRecordAudioParameters(AudioParameters* params) const = 0; |
| 174 #endif // WEBRTC_IOS | 183 #endif // WEBRTC_IOS |
| 175 | 184 |
| 176 protected: | 185 protected: |
| 177 ~AudioDeviceModule() override {} | 186 ~AudioDeviceModule() override {} |
| 178 }; | 187 }; |
| 179 | 188 |
| 180 } // namespace webrtc | 189 } // namespace webrtc |
| 181 | 190 |
| 182 #endif // MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_ | 191 #endif // MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_ |
| OLD | NEW |