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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 } | 94 } |
95 Sleep(10); | 95 Sleep(10); |
96 } | 96 } |
97 | 97 |
98 ADD_FAILURE() << "Failed to detect speech within 500 ms."; | 98 ADD_FAILURE() << "Failed to detect speech within 500 ms."; |
99 } | 99 } |
100 }; | 100 }; |
101 | 101 |
102 #if !defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID) | 102 #if !defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID) |
103 | 103 |
| 104 // Duplicated in apm_helpers_unittest.cc. |
104 TEST_F(AudioProcessingTest, AgcIsOnByDefault) { | 105 TEST_F(AudioProcessingTest, AgcIsOnByDefault) { |
105 bool agc_enabled = false; | 106 bool agc_enabled = false; |
106 webrtc::AgcModes agc_mode = webrtc::kAgcAdaptiveAnalog; | 107 webrtc::AgcModes agc_mode = webrtc::kAgcAdaptiveAnalog; |
107 | 108 |
108 EXPECT_EQ(0, voe_apm_->GetAgcStatus(agc_enabled, agc_mode)); | 109 EXPECT_EQ(0, voe_apm_->GetAgcStatus(agc_enabled, agc_mode)); |
109 EXPECT_TRUE(agc_enabled); | 110 EXPECT_TRUE(agc_enabled); |
110 EXPECT_EQ(webrtc::kAgcAdaptiveAnalog, agc_mode); | 111 EXPECT_EQ(webrtc::kAgcAdaptiveAnalog, agc_mode); |
111 } | 112 } |
112 | 113 |
| 114 // Duplicated in apm_helpers_unittest.cc. |
113 TEST_F(AudioProcessingTest, CanEnableAgcWithAllModes) { | 115 TEST_F(AudioProcessingTest, CanEnableAgcWithAllModes) { |
114 TryEnablingAgcWithMode(webrtc::kAgcAdaptiveDigital); | 116 TryEnablingAgcWithMode(webrtc::kAgcAdaptiveDigital); |
115 TryEnablingAgcWithMode(webrtc::kAgcAdaptiveAnalog); | 117 TryEnablingAgcWithMode(webrtc::kAgcAdaptiveAnalog); |
116 TryEnablingAgcWithMode(webrtc::kAgcFixedDigital); | 118 TryEnablingAgcWithMode(webrtc::kAgcFixedDigital); |
117 } | 119 } |
118 | 120 |
| 121 // Duplicated in apm_helpers_unittest.cc. |
119 TEST_F(AudioProcessingTest, EcIsDisabledAndAecIsDefaultEcMode) { | 122 TEST_F(AudioProcessingTest, EcIsDisabledAndAecIsDefaultEcMode) { |
120 bool ec_enabled = true; | 123 bool ec_enabled = true; |
121 webrtc::EcModes ec_mode = webrtc::kEcDefault; | 124 webrtc::EcModes ec_mode = webrtc::kEcDefault; |
122 | 125 |
123 EXPECT_EQ(0, voe_apm_->GetEcStatus(ec_enabled, ec_mode)); | 126 EXPECT_EQ(0, voe_apm_->GetEcStatus(ec_enabled, ec_mode)); |
124 EXPECT_FALSE(ec_enabled); | 127 EXPECT_FALSE(ec_enabled); |
125 EXPECT_EQ(webrtc::kEcAec, ec_mode); | 128 EXPECT_EQ(webrtc::kEcAec, ec_mode); |
126 } | 129 } |
127 | 130 |
| 131 // Not needed anymore - apm_helpers::SetEcStatus() doesn't take kEcAec. |
128 TEST_F(AudioProcessingTest, EnablingEcAecShouldEnableEcAec) { | 132 TEST_F(AudioProcessingTest, EnablingEcAecShouldEnableEcAec) { |
129 TryEnablingEcWithMode(webrtc::kEcAec, webrtc::kEcAec); | 133 TryEnablingEcWithMode(webrtc::kEcAec, webrtc::kEcAec); |
130 } | 134 } |
131 | 135 |
| 136 // Duplicated in apm_helpers_unittest.cc. |
132 TEST_F(AudioProcessingTest, EnablingEcConferenceShouldEnableEcAec) { | 137 TEST_F(AudioProcessingTest, EnablingEcConferenceShouldEnableEcAec) { |
133 TryEnablingEcWithMode(webrtc::kEcConference, webrtc::kEcAec); | 138 TryEnablingEcWithMode(webrtc::kEcConference, webrtc::kEcAec); |
134 } | 139 } |
135 | 140 |
| 141 // Not needed anymore - apm_helpers::SetEcStatus() doesn't take kEcDefault. |
136 TEST_F(AudioProcessingTest, EcModeIsPreservedWhenEcIsTurnedOff) { | 142 TEST_F(AudioProcessingTest, EcModeIsPreservedWhenEcIsTurnedOff) { |
137 TryEnablingEcWithMode(webrtc::kEcConference, webrtc::kEcAec); | 143 TryEnablingEcWithMode(webrtc::kEcConference, webrtc::kEcAec); |
138 | 144 |
139 EXPECT_EQ(0, voe_apm_->SetEcStatus(false)); | 145 EXPECT_EQ(0, voe_apm_->SetEcStatus(false)); |
140 | 146 |
141 bool ec_enabled = true; | 147 bool ec_enabled = true; |
142 webrtc::EcModes ec_mode = webrtc::kEcDefault; | 148 webrtc::EcModes ec_mode = webrtc::kEcDefault; |
143 EXPECT_EQ(0, voe_apm_->GetEcStatus(ec_enabled, ec_mode)); | 149 EXPECT_EQ(0, voe_apm_->GetEcStatus(ec_enabled, ec_mode)); |
144 | 150 |
145 EXPECT_FALSE(ec_enabled); | 151 EXPECT_FALSE(ec_enabled); |
146 EXPECT_EQ(webrtc::kEcAec, ec_mode); | 152 EXPECT_EQ(webrtc::kEcAec, ec_mode); |
147 } | 153 } |
148 | 154 |
| 155 // Not needed anymore - apm_helpers::SetEcStatus() doesn't take kEcDefault. |
149 TEST_F(AudioProcessingTest, CanEnableAndDisableEcModeSeveralTimesInARow) { | 156 TEST_F(AudioProcessingTest, CanEnableAndDisableEcModeSeveralTimesInARow) { |
150 for (int i = 0; i < 10; i++) { | 157 for (int i = 0; i < 10; i++) { |
151 EXPECT_EQ(0, voe_apm_->SetEcStatus(true)); | 158 EXPECT_EQ(0, voe_apm_->SetEcStatus(true)); |
152 EXPECT_EQ(0, voe_apm_->SetEcStatus(false)); | 159 EXPECT_EQ(0, voe_apm_->SetEcStatus(false)); |
153 } | 160 } |
154 | 161 |
155 bool ec_enabled = true; | 162 bool ec_enabled = true; |
156 webrtc::EcModes ec_mode = webrtc::kEcDefault; | 163 webrtc::EcModes ec_mode = webrtc::kEcDefault; |
157 EXPECT_EQ(0, voe_apm_->GetEcStatus(ec_enabled, ec_mode)); | 164 EXPECT_EQ(0, voe_apm_->GetEcStatus(ec_enabled, ec_mode)); |
158 | 165 |
159 EXPECT_FALSE(ec_enabled); | 166 EXPECT_FALSE(ec_enabled); |
160 EXPECT_EQ(webrtc::kEcAec, ec_mode); | 167 EXPECT_EQ(webrtc::kEcAec, ec_mode); |
161 } | 168 } |
162 | 169 |
163 #endif // !WEBRTC_IOS && !WEBRTC_ANDROID | 170 #endif // !WEBRTC_IOS && !WEBRTC_ANDROID |
164 | 171 |
| 172 // Duplicated in apm_helpers_unittest.cc. |
165 TEST_F(AudioProcessingTest, EnablingEcAecmShouldEnableEcAecm) { | 173 TEST_F(AudioProcessingTest, EnablingEcAecmShouldEnableEcAecm) { |
166 // This one apparently applies to Android and iPhone as well. | 174 // This one apparently applies to Android and iPhone as well. |
167 TryEnablingEcWithMode(webrtc::kEcAecm, webrtc::kEcAecm); | 175 TryEnablingEcWithMode(webrtc::kEcAecm, webrtc::kEcAecm); |
168 } | 176 } |
169 | 177 |
| 178 // Duplicated in apm_helpers_unittest.cc. |
170 TEST_F(AudioProcessingTest, EcAecmModeIsEnabledAndSpeakerphoneByDefault) { | 179 TEST_F(AudioProcessingTest, EcAecmModeIsEnabledAndSpeakerphoneByDefault) { |
171 bool cng_enabled = false; | 180 bool cng_enabled = false; |
172 webrtc::AecmModes aecm_mode = webrtc::kAecmEarpiece; | 181 webrtc::AecmModes aecm_mode = webrtc::kAecmEarpiece; |
173 | 182 |
174 voe_apm_->GetAecmMode(aecm_mode, cng_enabled); | 183 voe_apm_->GetAecmMode(aecm_mode, cng_enabled); |
175 | 184 |
176 EXPECT_TRUE(cng_enabled); | 185 EXPECT_TRUE(cng_enabled); |
177 EXPECT_EQ(webrtc::kAecmSpeakerphone, aecm_mode); | 186 EXPECT_EQ(webrtc::kAecmSpeakerphone, aecm_mode); |
178 } | 187 } |
179 | 188 |
| 189 // Duplicated in apm_helpers_unittest.cc. |
180 TEST_F(AudioProcessingTest, CanSetAecmMode) { | 190 TEST_F(AudioProcessingTest, CanSetAecmMode) { |
181 EXPECT_EQ(0, voe_apm_->SetEcStatus(true, webrtc::kEcAecm)); | 191 EXPECT_EQ(0, voe_apm_->SetEcStatus(true, webrtc::kEcAecm)); |
182 | 192 |
183 // Try some AECM mode - CNG enabled combinations. | 193 // Try some AECM mode - CNG enabled combinations. |
184 TryEnablingAecmWithMode(webrtc::kAecmEarpiece, true); | 194 TryEnablingAecmWithMode(webrtc::kAecmEarpiece, true); |
185 TryEnablingAecmWithMode(webrtc::kAecmEarpiece, false); | 195 TryEnablingAecmWithMode(webrtc::kAecmEarpiece, false); |
186 TryEnablingAecmWithMode(webrtc::kAecmLoudEarpiece, true); | 196 TryEnablingAecmWithMode(webrtc::kAecmLoudEarpiece, true); |
187 TryEnablingAecmWithMode(webrtc::kAecmLoudSpeakerphone, false); | 197 TryEnablingAecmWithMode(webrtc::kAecmLoudSpeakerphone, false); |
188 TryEnablingAecmWithMode(webrtc::kAecmQuietEarpieceOrHeadset, true); | 198 TryEnablingAecmWithMode(webrtc::kAecmQuietEarpieceOrHeadset, true); |
189 TryEnablingAecmWithMode(webrtc::kAecmSpeakerphone, false); | 199 TryEnablingAecmWithMode(webrtc::kAecmSpeakerphone, false); |
190 } | 200 } |
191 | 201 |
| 202 // Duplicated in apm_helpers_unittest.cc. |
192 TEST_F(AudioProcessingTest, NsIsOffWithModerateSuppressionByDefault) { | 203 TEST_F(AudioProcessingTest, NsIsOffWithModerateSuppressionByDefault) { |
193 bool ns_status = true; | 204 bool ns_status = true; |
194 webrtc::NsModes ns_mode = webrtc::kNsDefault; | 205 webrtc::NsModes ns_mode = webrtc::kNsDefault; |
195 EXPECT_EQ(0, voe_apm_->GetNsStatus(ns_status, ns_mode)); | 206 EXPECT_EQ(0, voe_apm_->GetNsStatus(ns_status, ns_mode)); |
196 | 207 |
197 EXPECT_FALSE(ns_status); | 208 EXPECT_FALSE(ns_status); |
198 EXPECT_EQ(webrtc::kNsModerateSuppression, ns_mode); | 209 EXPECT_EQ(webrtc::kNsModerateSuppression, ns_mode); |
199 } | 210 } |
200 | 211 |
| 212 // Duplicated in apm_helpers_unittest.cc. |
201 TEST_F(AudioProcessingTest, CanSetNsMode) { | 213 TEST_F(AudioProcessingTest, CanSetNsMode) { |
202 // Concrete suppression values map to themselves. | 214 // Concrete suppression values map to themselves. |
203 TryEnablingNsWithMode(webrtc::kNsHighSuppression, | 215 TryEnablingNsWithMode(webrtc::kNsHighSuppression, |
204 webrtc::kNsHighSuppression); | 216 webrtc::kNsHighSuppression); |
205 TryEnablingNsWithMode(webrtc::kNsLowSuppression, | 217 TryEnablingNsWithMode(webrtc::kNsLowSuppression, |
206 webrtc::kNsLowSuppression); | 218 webrtc::kNsLowSuppression); |
207 TryEnablingNsWithMode(webrtc::kNsModerateSuppression, | 219 TryEnablingNsWithMode(webrtc::kNsModerateSuppression, |
208 webrtc::kNsModerateSuppression); | 220 webrtc::kNsModerateSuppression); |
209 TryEnablingNsWithMode(webrtc::kNsVeryHighSuppression, | 221 TryEnablingNsWithMode(webrtc::kNsVeryHighSuppression, |
210 webrtc::kNsVeryHighSuppression); | 222 webrtc::kNsVeryHighSuppression); |
211 | 223 |
212 // Conference and Default map to concrete values. | 224 // Conference and Default map to concrete values. |
213 TryEnablingNsWithMode(webrtc::kNsConference, | 225 TryEnablingNsWithMode(webrtc::kNsConference, |
214 webrtc::kNsHighSuppression); | 226 webrtc::kNsHighSuppression); |
215 TryEnablingNsWithMode(webrtc::kNsDefault, | 227 TryEnablingNsWithMode(webrtc::kNsDefault, |
216 webrtc::kNsModerateSuppression); | 228 webrtc::kNsModerateSuppression); |
217 } | 229 } |
218 | 230 |
| 231 // TODO(solenberg): Duplicate this test at the voe::Channel layer. |
| 232 // Not needed anymore - API is unused. |
219 TEST_F(AudioProcessingTest, VadIsDisabledByDefault) { | 233 TEST_F(AudioProcessingTest, VadIsDisabledByDefault) { |
220 bool vad_enabled; | 234 bool vad_enabled; |
221 bool disabled_dtx; | 235 bool disabled_dtx; |
222 webrtc::VadModes vad_mode; | 236 webrtc::VadModes vad_mode; |
223 | 237 |
224 EXPECT_EQ(0, voe_codec_->GetVADStatus( | 238 EXPECT_EQ(0, voe_codec_->GetVADStatus( |
225 channel_, vad_enabled, vad_mode, disabled_dtx)); | 239 channel_, vad_enabled, vad_mode, disabled_dtx)); |
226 | 240 |
227 EXPECT_FALSE(vad_enabled); | 241 EXPECT_FALSE(vad_enabled); |
228 } | 242 } |
229 | 243 |
| 244 // Not needed anymore - API is unused. |
230 TEST_F(AudioProcessingTest, VoiceActivityIndicatorReturns1WithSpeechOn) { | 245 TEST_F(AudioProcessingTest, VoiceActivityIndicatorReturns1WithSpeechOn) { |
231 // This sleep is necessary since the voice detection algorithm needs some | 246 // This sleep is necessary since the voice detection algorithm needs some |
232 // time to detect the speech from the fake microphone. | 247 // time to detect the speech from the fake microphone. |
233 Sleep(500); | 248 Sleep(500); |
234 EXPECT_EQ(1, voe_apm_->VoiceActivityIndicator(channel_)); | 249 EXPECT_EQ(1, voe_apm_->VoiceActivityIndicator(channel_)); |
235 } | 250 } |
236 | 251 |
| 252 // Not needed anymore - API is unused. |
237 TEST_F(AudioProcessingTest, CanSetDelayOffset) { | 253 TEST_F(AudioProcessingTest, CanSetDelayOffset) { |
238 voe_apm_->SetDelayOffsetMs(50); | 254 voe_apm_->SetDelayOffsetMs(50); |
239 EXPECT_EQ(50, voe_apm_->DelayOffsetMs()); | 255 EXPECT_EQ(50, voe_apm_->DelayOffsetMs()); |
240 voe_apm_->SetDelayOffsetMs(-50); | 256 voe_apm_->SetDelayOffsetMs(-50); |
241 EXPECT_EQ(-50, voe_apm_->DelayOffsetMs()); | 257 EXPECT_EQ(-50, voe_apm_->DelayOffsetMs()); |
242 } | 258 } |
243 | 259 |
| 260 // Duplicated in apm_helpers_unittest.cc. |
244 TEST_F(AudioProcessingTest, HighPassFilterIsOnByDefault) { | 261 TEST_F(AudioProcessingTest, HighPassFilterIsOnByDefault) { |
245 EXPECT_TRUE(voe_apm_->IsHighPassFilterEnabled()); | 262 EXPECT_TRUE(voe_apm_->IsHighPassFilterEnabled()); |
246 } | 263 } |
247 | 264 |
| 265 // TODO(solenberg): Check that sufficient testing is done in APM. |
| 266 // Not needed anymore - API is unused. |
248 TEST_F(AudioProcessingTest, CanSetHighPassFilter) { | 267 TEST_F(AudioProcessingTest, CanSetHighPassFilter) { |
249 EXPECT_EQ(0, voe_apm_->EnableHighPassFilter(true)); | 268 EXPECT_EQ(0, voe_apm_->EnableHighPassFilter(true)); |
250 EXPECT_TRUE(voe_apm_->IsHighPassFilterEnabled()); | 269 EXPECT_TRUE(voe_apm_->IsHighPassFilterEnabled()); |
251 EXPECT_EQ(0, voe_apm_->EnableHighPassFilter(false)); | 270 EXPECT_EQ(0, voe_apm_->EnableHighPassFilter(false)); |
252 EXPECT_FALSE(voe_apm_->IsHighPassFilterEnabled()); | 271 EXPECT_FALSE(voe_apm_->IsHighPassFilterEnabled()); |
253 } | 272 } |
254 | 273 |
| 274 // Duplicated in apm_helpers_unittest.cc. |
255 TEST_F(AudioProcessingTest, StereoChannelSwappingIsOffByDefault) { | 275 TEST_F(AudioProcessingTest, StereoChannelSwappingIsOffByDefault) { |
256 EXPECT_FALSE(voe_apm_->IsStereoChannelSwappingEnabled()); | 276 EXPECT_FALSE(voe_apm_->IsStereoChannelSwappingEnabled()); |
257 } | 277 } |
258 | 278 |
| 279 // Duplicated in apm_helpers_unittest.cc. |
259 TEST_F(AudioProcessingTest, CanSetStereoChannelSwapping) { | 280 TEST_F(AudioProcessingTest, CanSetStereoChannelSwapping) { |
260 voe_apm_->EnableStereoChannelSwapping(true); | 281 voe_apm_->EnableStereoChannelSwapping(true); |
261 EXPECT_TRUE(voe_apm_->IsStereoChannelSwappingEnabled()); | 282 EXPECT_TRUE(voe_apm_->IsStereoChannelSwappingEnabled()); |
262 voe_apm_->EnableStereoChannelSwapping(false); | 283 voe_apm_->EnableStereoChannelSwapping(false); |
263 EXPECT_FALSE(voe_apm_->IsStereoChannelSwappingEnabled()); | 284 EXPECT_FALSE(voe_apm_->IsStereoChannelSwappingEnabled()); |
264 } | 285 } |
265 | 286 |
| 287 // TODO(solenberg): Check that sufficient testing is done in APM. |
266 TEST_F(AudioProcessingTest, CanStartAndStopDebugRecording) { | 288 TEST_F(AudioProcessingTest, CanStartAndStopDebugRecording) { |
267 std::string output_path = webrtc::test::OutputPath(); | 289 std::string output_path = webrtc::test::OutputPath(); |
268 std::string output_file = output_path + "apm_debug.txt"; | 290 std::string output_file = output_path + "apm_debug.txt"; |
269 | 291 |
270 EXPECT_EQ(0, voe_apm_->StartDebugRecording(output_file.c_str())); | 292 EXPECT_EQ(0, voe_apm_->StartDebugRecording(output_file.c_str())); |
271 Sleep(1000); | 293 Sleep(1000); |
272 EXPECT_EQ(0, voe_apm_->StopDebugRecording()); | 294 EXPECT_EQ(0, voe_apm_->StopDebugRecording()); |
273 } | 295 } |
274 | 296 |
275 #if defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) | 297 #if defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) |
276 | 298 |
| 299 // Duplicated in apm_helpers_unittest.cc. |
277 TEST_F(AudioProcessingTest, AgcIsOffByDefaultAndDigital) { | 300 TEST_F(AudioProcessingTest, AgcIsOffByDefaultAndDigital) { |
278 bool agc_enabled = true; | 301 bool agc_enabled = true; |
279 webrtc::AgcModes agc_mode = webrtc::kAgcAdaptiveAnalog; | 302 webrtc::AgcModes agc_mode = webrtc::kAgcAdaptiveAnalog; |
280 | 303 |
281 EXPECT_EQ(0, voe_apm_->GetAgcStatus(agc_enabled, agc_mode)); | 304 EXPECT_EQ(0, voe_apm_->GetAgcStatus(agc_enabled, agc_mode)); |
282 EXPECT_FALSE(agc_enabled); | 305 EXPECT_FALSE(agc_enabled); |
283 EXPECT_EQ(webrtc::kAgcAdaptiveDigital, agc_mode); | 306 EXPECT_EQ(webrtc::kAgcAdaptiveDigital, agc_mode); |
284 } | 307 } |
285 | 308 |
| 309 // Duplicated in apm_helpers_unittest.cc. |
286 TEST_F(AudioProcessingTest, CanEnableAgcInAdaptiveDigitalMode) { | 310 TEST_F(AudioProcessingTest, CanEnableAgcInAdaptiveDigitalMode) { |
287 TryEnablingAgcWithMode(webrtc::kAgcAdaptiveDigital); | 311 TryEnablingAgcWithMode(webrtc::kAgcAdaptiveDigital); |
288 } | 312 } |
289 | 313 |
| 314 // Duplicated in apm_helpers_unittest.cc. |
290 TEST_F(AudioProcessingTest, AgcIsPossibleExceptInAdaptiveAnalogMode) { | 315 TEST_F(AudioProcessingTest, AgcIsPossibleExceptInAdaptiveAnalogMode) { |
291 EXPECT_EQ(-1, voe_apm_->SetAgcStatus(true, webrtc::kAgcAdaptiveAnalog)); | 316 EXPECT_EQ(-1, voe_apm_->SetAgcStatus(true, webrtc::kAgcAdaptiveAnalog)); |
292 EXPECT_EQ(0, voe_apm_->SetAgcStatus(true, webrtc::kAgcFixedDigital)); | 317 EXPECT_EQ(0, voe_apm_->SetAgcStatus(true, webrtc::kAgcFixedDigital)); |
293 EXPECT_EQ(0, voe_apm_->SetAgcStatus(true, webrtc::kAgcAdaptiveDigital)); | 318 EXPECT_EQ(0, voe_apm_->SetAgcStatus(true, webrtc::kAgcAdaptiveDigital)); |
294 } | 319 } |
295 | 320 |
| 321 // Duplicated in apm_helpers_unittest.cc. |
296 TEST_F(AudioProcessingTest, EcIsDisabledAndAecmIsDefaultEcMode) { | 322 TEST_F(AudioProcessingTest, EcIsDisabledAndAecmIsDefaultEcMode) { |
297 bool ec_enabled = true; | 323 bool ec_enabled = true; |
298 webrtc::EcModes ec_mode = webrtc::kEcDefault; | 324 webrtc::EcModes ec_mode = webrtc::kEcDefault; |
299 | 325 |
300 EXPECT_EQ(0, voe_apm_->GetEcStatus(ec_enabled, ec_mode)); | 326 EXPECT_EQ(0, voe_apm_->GetEcStatus(ec_enabled, ec_mode)); |
301 EXPECT_FALSE(ec_enabled); | 327 EXPECT_FALSE(ec_enabled); |
302 EXPECT_EQ(webrtc::kEcAecm, ec_mode); | 328 EXPECT_EQ(webrtc::kEcAecm, ec_mode); |
303 } | 329 } |
304 | 330 |
| 331 // Not needed anymore - API is unused. |
305 TEST_F(AudioProcessingTest, TestVoiceActivityDetection) { | 332 TEST_F(AudioProcessingTest, TestVoiceActivityDetection) { |
306 TryDetectingSilence(); | 333 TryDetectingSilence(); |
307 TryDetectingSpeechAfterSilence(); | 334 TryDetectingSpeechAfterSilence(); |
308 } | 335 } |
309 | 336 |
310 #endif // WEBRTC_IOS || WEBRTC_ANDROID | 337 #endif // WEBRTC_IOS || WEBRTC_ANDROID |
OLD | NEW |