• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
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 
14 #include "webrtc/voice_engine/include/voe_hardware.h"
15 
16 #include "webrtc/voice_engine/shared_data.h"
17 
18 namespace webrtc {
19 
20 class VoEHardwareImpl : public VoEHardware {
21  public:
22   int GetNumOfRecordingDevices(int& devices) override;
23 
24   int GetNumOfPlayoutDevices(int& devices) override;
25 
26   int GetRecordingDeviceName(int index,
27                              char strNameUTF8[128],
28                              char strGuidUTF8[128]) override;
29 
30   int GetPlayoutDeviceName(int index,
31                            char strNameUTF8[128],
32                            char strGuidUTF8[128]) override;
33 
34   int SetRecordingDevice(int index,
35                          StereoChannel recordingChannel = kStereoBoth) override;
36 
37   int SetPlayoutDevice(int index) override;
38 
39   int SetAudioDeviceLayer(AudioLayers audioLayer) override;
40 
41   int GetAudioDeviceLayer(AudioLayers& audioLayer) override;
42 
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;
47 
48   bool BuiltInAECIsAvailable() const override;
49   int EnableBuiltInAEC(bool enable) override;
50   bool BuiltInAGCIsAvailable() const override;
51   int EnableBuiltInAGC(bool enable) override;
52   bool BuiltInNSIsAvailable() const override;
53   int EnableBuiltInNS(bool enable) override;
54 
55  protected:
56   VoEHardwareImpl(voe::SharedData* shared);
57   ~VoEHardwareImpl() override;
58 
59  private:
60   voe::SharedData* _shared;
61 };
62 
63 }  // namespace webrtc
64 
65 #endif  // WEBRTC_VOICE_ENGINE_VOE_HARDWARE_IMPL_H
66