OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 #define WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_H | 36 #define WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_H |
37 | 37 |
38 #include <stdio.h> | 38 #include <stdio.h> |
39 | 39 |
40 #include "webrtc/common_types.h" | 40 #include "webrtc/common_types.h" |
41 | 41 |
42 namespace webrtc { | 42 namespace webrtc { |
43 | 43 |
44 class VoiceEngine; | 44 class VoiceEngine; |
45 | 45 |
46 // VoERxVadCallback | |
47 class WEBRTC_DLLEXPORT VoERxVadCallback { | |
48 public: | |
49 virtual void OnRxVad(int channel, int vadDecision) = 0; | |
50 | |
51 protected: | |
52 virtual ~VoERxVadCallback() {} | |
53 }; | |
54 | |
55 // VoEAudioProcessing | 46 // VoEAudioProcessing |
56 class WEBRTC_DLLEXPORT VoEAudioProcessing { | 47 class WEBRTC_DLLEXPORT VoEAudioProcessing { |
57 public: | 48 public: |
58 // Factory for the VoEAudioProcessing sub-API. Increases an internal | 49 // Factory for the VoEAudioProcessing sub-API. Increases an internal |
59 // reference counter if successful. Returns NULL if the API is not | 50 // reference counter if successful. Returns NULL if the API is not |
60 // supported or if construction fails. | 51 // supported or if construction fails. |
61 static VoEAudioProcessing* GetInterface(VoiceEngine* voiceEngine); | 52 static VoEAudioProcessing* GetInterface(VoiceEngine* voiceEngine); |
62 | 53 |
63 // Releases the VoEAudioProcessing sub-API and decreases an internal | 54 // Releases the VoEAudioProcessing sub-API and decreases an internal |
64 // reference counter. Returns the new reference count. This value should | 55 // reference counter. Returns the new reference count. This value should |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 bool enableCNG = true) = 0; | 110 bool enableCNG = true) = 0; |
120 | 111 |
121 // Gets settings for the AECM. | 112 // Gets settings for the AECM. |
122 virtual int GetAecmMode(AecmModes& mode, bool& enabledCNG) = 0; | 113 virtual int GetAecmMode(AecmModes& mode, bool& enabledCNG) = 0; |
123 | 114 |
124 // Enables a high pass filter on the capture signal. This removes DC bias | 115 // Enables a high pass filter on the capture signal. This removes DC bias |
125 // and low-frequency noise. Recommended to be enabled. | 116 // and low-frequency noise. Recommended to be enabled. |
126 virtual int EnableHighPassFilter(bool enable) = 0; | 117 virtual int EnableHighPassFilter(bool enable) = 0; |
127 virtual bool IsHighPassFilterEnabled() = 0; | 118 virtual bool IsHighPassFilterEnabled() = 0; |
128 | 119 |
129 // Sets status and mode of the receiving-side (Rx) NS. | |
130 // The Rx NS reduces noise in the received signal for the specified | |
131 // |channel|. Intended for advanced usage only. | |
132 virtual int SetRxNsStatus(int channel, | |
133 bool enable, | |
134 NsModes mode = kNsUnchanged) = 0; | |
135 | |
136 // Gets status and mode of the receiving-side NS. | |
137 virtual int GetRxNsStatus(int channel, bool& enabled, NsModes& mode) = 0; | |
138 | |
139 // Sets status and mode of the receiving-side (Rx) AGC. | |
140 // The Rx AGC adjusts the received signal to an appropriate level | |
141 // for the specified |channel|. Intended for advanced usage only. | |
142 virtual int SetRxAgcStatus(int channel, | |
143 bool enable, | |
144 AgcModes mode = kAgcUnchanged) = 0; | |
145 | |
146 // Gets status and mode of the receiving-side AGC. | |
147 virtual int GetRxAgcStatus(int channel, bool& enabled, AgcModes& mode) = 0; | |
148 | |
149 // Modifies the AGC configuration on the receiving side for the | |
150 // specified |channel|. | |
151 virtual int SetRxAgcConfig(int channel, AgcConfig config) = 0; | |
152 | |
153 // Gets the AGC configuration on the receiving side. | |
154 virtual int GetRxAgcConfig(int channel, AgcConfig& config) = 0; | |
155 | |
156 // Registers a VoERxVadCallback |observer| instance and enables Rx VAD | |
157 // notifications for the specified |channel|. | |
158 virtual int RegisterRxVadObserver(int channel, | |
159 VoERxVadCallback& observer) = 0; | |
160 | |
161 // Deregisters the VoERxVadCallback |observer| and disables Rx VAD | |
162 // notifications for the specified |channel|. | |
163 virtual int DeRegisterRxVadObserver(int channel) = 0; | |
164 | |
165 // Gets the VAD/DTX activity for the specified |channel|. | 120 // Gets the VAD/DTX activity for the specified |channel|. |
166 // The returned value is 1 if frames of audio contains speech | 121 // The returned value is 1 if frames of audio contains speech |
167 // and 0 if silence. The output is always 1 if VAD is disabled. | 122 // and 0 if silence. The output is always 1 if VAD is disabled. |
168 virtual int VoiceActivityIndicator(int channel) = 0; | 123 virtual int VoiceActivityIndicator(int channel) = 0; |
169 | 124 |
170 // Enables or disables the possibility to retrieve echo metrics and delay | 125 // Enables or disables the possibility to retrieve echo metrics and delay |
171 // logging values during an active call. The metrics are only supported in | 126 // logging values during an active call. The metrics are only supported in |
172 // AEC. | 127 // AEC. |
173 virtual int SetEcMetricsStatus(bool enable) = 0; | 128 virtual int SetEcMetricsStatus(bool enable) = 0; |
174 | 129 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 virtual bool IsStereoChannelSwappingEnabled() = 0; | 186 virtual bool IsStereoChannelSwappingEnabled() = 0; |
232 | 187 |
233 protected: | 188 protected: |
234 VoEAudioProcessing() {} | 189 VoEAudioProcessing() {} |
235 virtual ~VoEAudioProcessing() {} | 190 virtual ~VoEAudioProcessing() {} |
236 }; | 191 }; |
237 | 192 |
238 } // namespace webrtc | 193 } // namespace webrtc |
239 | 194 |
240 #endif // WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_H | 195 #endif // WEBRTC_VOICE_ENGINE_VOE_AUDIO_PROCESSING_H |
OLD | NEW |