blob: 4e06f978d97f2d9d931d1af5de211a71efdd31ef [file] [log] [blame]
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +00001/*
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
pbos@webrtc.org471ae722013-05-21 13:52:32 +000014#include "webrtc/voice_engine/include/voe_hardware.h"
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000015
pbos@webrtc.org471ae722013-05-21 13:52:32 +000016#include "webrtc/voice_engine/shared_data.h"
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000017
18namespace webrtc
19{
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000020
21class VoEHardwareImpl: public VoEHardware
22{
23public:
24 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
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +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
62 virtual int EnableBuiltInAEC(bool enable);
63 virtual bool BuiltInAECIsEnabled() const;
64
leozwang@webrtc.org15e35cc2012-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
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000070protected:
71 VoEHardwareImpl(voe::SharedData* shared);
72 virtual ~VoEHardwareImpl();
73
74private:
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000075 voe::SharedData* _shared;
76};
77
pbos@webrtc.org3b89e102013-07-03 15:12:26 +000078} // namespace webrtc
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000079
80#endif // WEBRTC_VOICE_ENGINE_VOE_HARDWARE_IMPL_H