| 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_GENERIC_H | 11 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H |
| 12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H | 12 #define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H |
| 13 | 13 |
| 14 #include "webrtc/modules/audio_device/audio_device_buffer.h" | 14 #include "webrtc/modules/audio_device/audio_device_buffer.h" |
| 15 #include "webrtc/modules/audio_device/include/audio_device.h" | 15 #include "webrtc/modules/audio_device/include/audio_device.h" |
| 16 | 16 |
| 17 namespace webrtc { | 17 namespace webrtc { |
| 18 | 18 |
| 19 class AudioDeviceGeneric { | 19 class AudioDeviceGeneric { |
| 20 public: | 20 public: |
| 21 // For use with UMA logging. Must be kept in sync with histograms.xml in |
| 22 // Chrome, located at |
| 23 // https://cs.chromium.org/chromium/src/tools/metrics/histograms/histograms.xm
l |
| 24 enum class InitStatus { |
| 25 OK = 0, |
| 26 PLAYOUT_ERROR = 1, |
| 27 RECORDING_ERROR = 2, |
| 28 OTHER_ERROR = 3, |
| 29 NUM_STATUSES = 4 |
| 30 }; |
| 21 // Retrieve the currently utilized audio layer | 31 // Retrieve the currently utilized audio layer |
| 22 virtual int32_t ActiveAudioLayer( | 32 virtual int32_t ActiveAudioLayer( |
| 23 AudioDeviceModule::AudioLayer& audioLayer) const = 0; | 33 AudioDeviceModule::AudioLayer& audioLayer) const = 0; |
| 24 | 34 |
| 25 // Main initializaton and termination | 35 // Main initializaton and termination |
| 26 virtual int32_t Init() = 0; | 36 virtual InitStatus Init() = 0; |
| 27 virtual int32_t Terminate() = 0; | 37 virtual int32_t Terminate() = 0; |
| 28 virtual bool Initialized() const = 0; | 38 virtual bool Initialized() const = 0; |
| 29 | 39 |
| 30 // Device enumeration | 40 // Device enumeration |
| 31 virtual int16_t PlayoutDevices() = 0; | 41 virtual int16_t PlayoutDevices() = 0; |
| 32 virtual int16_t RecordingDevices() = 0; | 42 virtual int16_t RecordingDevices() = 0; |
| 33 virtual int32_t PlayoutDeviceName(uint16_t index, | 43 virtual int32_t PlayoutDeviceName(uint16_t index, |
| 34 char name[kAdmMaxDeviceNameSize], | 44 char name[kAdmMaxDeviceNameSize], |
| 35 char guid[kAdmMaxGuidSize]) = 0; | 45 char guid[kAdmMaxGuidSize]) = 0; |
| 36 virtual int32_t RecordingDeviceName(uint16_t index, | 46 virtual int32_t RecordingDeviceName(uint16_t index, |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 virtual void ClearRecordingError() = 0; | 182 virtual void ClearRecordingError() = 0; |
| 173 | 183 |
| 174 virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) = 0; | 184 virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) = 0; |
| 175 | 185 |
| 176 virtual ~AudioDeviceGeneric() {} | 186 virtual ~AudioDeviceGeneric() {} |
| 177 }; | 187 }; |
| 178 | 188 |
| 179 } // namespace webrtc | 189 } // namespace webrtc |
| 180 | 190 |
| 181 #endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H | 191 #endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_GENERIC_H |
| OLD | NEW |