niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 1 | /* |
tommi@webrtc.org | 851becd | 2012-04-04 14:57:19 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_VOICE_ENGINE_VOE_HARDWARE_IMPL_H |
| 12 | #define WEBRTC_VOICE_ENGINE_VOE_HARDWARE_IMPL_H |
| 13 | |
pbos@webrtc.org | 956aa7e | 2013-05-21 13:52:32 | [diff] [blame] | 14 | #include "webrtc/voice_engine/include/voe_hardware.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 15 | |
pbos@webrtc.org | 956aa7e | 2013-05-21 13:52:32 | [diff] [blame] | 16 | #include "webrtc/voice_engine/shared_data.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 17 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 18 | namespace webrtc { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 19 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 20 | class VoEHardwareImpl : public VoEHardware { |
| 21 | public: |
| 22 | int GetNumOfRecordingDevices(int& devices) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 23 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 24 | int GetNumOfPlayoutDevices(int& devices) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 25 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 26 | int GetRecordingDeviceName(int index, |
| 27 | char strNameUTF8[128], |
| 28 | char strGuidUTF8[128]) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 29 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 30 | int GetPlayoutDeviceName(int index, |
| 31 | char strNameUTF8[128], |
| 32 | char strGuidUTF8[128]) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 33 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 34 | int SetRecordingDevice(int index, |
| 35 | StereoChannel recordingChannel = kStereoBoth) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 36 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 37 | int SetPlayoutDevice(int index) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 38 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 39 | int SetAudioDeviceLayer(AudioLayers audioLayer) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 40 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 41 | int GetAudioDeviceLayer(AudioLayers& audioLayer) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 42 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 43 | int SetRecordingSampleRate(unsigned int samples_per_sec) override; |
| 44 | int RecordingSampleRate(unsigned int* samples_per_sec) const override; |
| 45 | int SetPlayoutSampleRate(unsigned int samples_per_sec) override; |
| 46 | int PlayoutSampleRate(unsigned int* samples_per_sec) const override; |
leozwang@webrtc.org | 96bcac8 | 2012-12-04 19:11:55 | [diff] [blame] | 47 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 48 | bool BuiltInAECIsAvailable() const override; |
| 49 | int EnableBuiltInAEC(bool enable) override; |
henrika | c14f5ff | 2015-09-23 12:08:33 | [diff] [blame] | 50 | bool BuiltInAGCIsAvailable() const override; |
| 51 | int EnableBuiltInAGC(bool enable) override; |
| 52 | bool BuiltInNSIsAvailable() const override; |
| 53 | int EnableBuiltInNS(bool enable) override; |
henrika@webrtc.org | a954c07 | 2014-12-09 16:22:09 | [diff] [blame] | 54 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 55 | protected: |
| 56 | VoEHardwareImpl(voe::SharedData* shared); |
| 57 | ~VoEHardwareImpl() override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 58 | |
Jelena Marusic | 0d26605 | 2015-05-04 12:15:32 | [diff] [blame] | 59 | private: |
| 60 | voe::SharedData* _shared; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 61 | }; |
| 62 | |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 | [diff] [blame] | 63 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 | [diff] [blame] | 64 | |
| 65 | #endif // WEBRTC_VOICE_ENGINE_VOE_HARDWARE_IMPL_H |