blob: 3d6b64de7f664457fb263c8f8bd6a2502112b134 [file] [log] [blame]
andrew@webrtc.orga7b57da2012-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_AUDIO_PROCESSING_IMPL_H
12#define WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_IMPL_H
13
14#include "voe_audio_processing.h"
15
16#include "shared_data.h"
17
18namespace webrtc {
19
20class VoEAudioProcessingImpl : public VoEAudioProcessing {
21 public:
22 virtual int SetNsStatus(bool enable, NsModes mode = kNsUnchanged);
23
24 virtual int GetNsStatus(bool& enabled, NsModes& mode);
25
26 virtual int SetAgcStatus(bool enable, AgcModes mode = kAgcUnchanged);
27
28 virtual int GetAgcStatus(bool& enabled, AgcModes& mode);
29
30 virtual int SetAgcConfig(const AgcConfig config);
31
32 virtual int GetAgcConfig(AgcConfig& config);
33
34 virtual int SetRxNsStatus(int channel,
35 bool enable,
36 NsModes mode = kNsUnchanged);
37
38 virtual int GetRxNsStatus(int channel, bool& enabled, NsModes& mode);
39
40 virtual int SetRxAgcStatus(int channel,
41 bool enable,
42 AgcModes mode = kAgcUnchanged);
43
44 virtual int GetRxAgcStatus(int channel, bool& enabled, AgcModes& mode);
45
46 virtual int SetRxAgcConfig(int channel, const AgcConfig config);
47
48 virtual int GetRxAgcConfig(int channel, AgcConfig& config);
49
50 virtual int SetEcStatus(bool enable, EcModes mode = kEcUnchanged);
51 virtual int GetEcStatus(bool& enabled, EcModes& mode);
52 virtual int EnableDriftCompensation(bool enable);
53 virtual bool DriftCompensationEnabled();
54
55 virtual void SetDelayOffsetMs(int offset);
56 virtual int DelayOffsetMs();
57
58 virtual int SetAecmMode(AecmModes mode = kAecmSpeakerphone,
59 bool enableCNG = true);
60
61 virtual int GetAecmMode(AecmModes& mode, bool& enabledCNG);
62
63 virtual int EnableHighPassFilter(bool enable);
64 virtual bool IsHighPassFilterEnabled();
65
66 virtual int RegisterRxVadObserver(int channel,
67 VoERxVadCallback& observer);
68
69 virtual int DeRegisterRxVadObserver(int channel);
70
71 virtual int VoiceActivityIndicator(int channel);
72
73 virtual int SetEcMetricsStatus(bool enable);
74
75 virtual int GetEcMetricsStatus(bool& enabled);
76
77 virtual int GetEchoMetrics(int& ERL, int& ERLE, int& RERL, int& A_NLP);
78
79 virtual int GetEcDelayMetrics(int& delay_median, int& delay_std);
80
81 virtual int StartDebugRecording(const char* fileNameUTF8);
82
83 virtual int StopDebugRecording();
84
85 virtual int SetTypingDetectionStatus(bool enable);
86
87 virtual int GetTypingDetectionStatus(bool& enabled);
88
89 virtual int TimeSinceLastTyping(int &seconds);
90
91 // TODO(niklase) Remove default argument as soon as libJingle is updated!
92 virtual int SetTypingDetectionParameters(int timeWindow,
93 int costPerTyping,
94 int reportingThreshold,
95 int penaltyDecay,
96 int typeEventDelay = 0);
97
98 virtual void EnableStereoChannelSwapping(bool enable);
99 virtual bool IsStereoChannelSwappingEnabled();
100
101 protected:
102 VoEAudioProcessingImpl(voe::SharedData* shared);
103 virtual ~VoEAudioProcessingImpl();
104
105 private:
106 bool _isAecMode;
107 voe::SharedData* _shared;
108};
109
110} // namespace webrtc
111
112#endif // WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_IMPL_H
113