blob: 1b2f34347a9918bc2c6124598e39aef61b9d40f9 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
tommi@webrtc.org851becd2012-04-04 14:57:19 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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 "voe_hardware.h"
15
niklase@google.com470e71d2011-07-07 08:21:25 +000016#include "shared_data.h"
17
18namespace webrtc
19{
niklase@google.com470e71d2011-07-07 08:21:25 +000020
tommi@webrtc.orga990e122012-04-26 15:28:22 +000021class VoEHardwareImpl: public VoEHardware
niklase@google.com470e71d2011-07-07 08:21:25 +000022{
23public:
niklase@google.com470e71d2011-07-07 08:21:25 +000024 virtual int GetNumOfRecordingDevices(int& devices);
25
26 virtual int GetNumOfPlayoutDevices(int& devices);
27
28 virtual int GetRecordingDeviceName(int index,
29 char strNameUTF8[128],
30 char strGuidUTF8[128]);
31
32 virtual int GetPlayoutDeviceName(int index,
33 char strNameUTF8[128],
34 char strGuidUTF8[128]);
35
36 virtual int GetRecordingDeviceStatus(bool& isAvailable);
37
38 virtual int GetPlayoutDeviceStatus(bool& isAvailable);
39
40 virtual int SetRecordingDevice(
41 int index,
42 StereoChannel recordingChannel = kStereoBoth);
43
44 virtual int SetPlayoutDevice(int index);
45
46 virtual int SetAudioDeviceLayer(AudioLayers audioLayer);
47
48 virtual int GetAudioDeviceLayer(AudioLayers& audioLayer);
49
50 virtual int GetCPULoad(int& loadPercent);
51
niklase@google.com470e71d2011-07-07 08:21:25 +000052 virtual int ResetAudioDevice();
53
54 virtual int AudioDeviceControl(unsigned int par1,
55 unsigned int par2,
56 unsigned int par3);
57
58 virtual int SetLoudspeakerStatus(bool enable);
59
60 virtual int GetLoudspeakerStatus(bool& enabled);
61
andrew@webrtc.orga3c6d612011-09-13 17:17:49 +000062 virtual int EnableBuiltInAEC(bool enable);
63 virtual bool BuiltInAECIsEnabled() const;
64
leozwang@webrtc.org96bcac82012-12-04 19:11:55 +000065 virtual int SetRecordingSampleRate(unsigned int samples_per_sec);
66 virtual int RecordingSampleRate(unsigned int* samples_per_sec) const;
67 virtual int SetPlayoutSampleRate(unsigned int samples_per_sec);
68 virtual int PlayoutSampleRate(unsigned int* samples_per_sec) const;
69
niklase@google.com470e71d2011-07-07 08:21:25 +000070protected:
tommi@webrtc.org851becd2012-04-04 14:57:19 +000071 VoEHardwareImpl(voe::SharedData* shared);
niklase@google.com470e71d2011-07-07 08:21:25 +000072 virtual ~VoEHardwareImpl();
73
74private:
tommi@webrtc.org851becd2012-04-04 14:57:19 +000075 voe::SharedData* _shared;
niklase@google.com470e71d2011-07-07 08:21:25 +000076};
77
78} // namespace webrtc
79
80#endif // WEBRTC_VOICE_ENGINE_VOE_HARDWARE_IMPL_H