This CL introduces the new functionality for setting

the APM parameters to the high-pass filter.

The introduction will be done in three steps:
1) This CL which introduces the new scheme and
 changes the code in webrtcvoiceengine.cc to use it.
2) Introduce the scheme into upstream code.
3) Remove the HighPassFilter interface in APM.

BUG=webrtc::6220, webrtc::6296, webrtc::6297, webrtc::6181, webrtc::5298

Review-Url: https://codereview.webrtc.org/2415403002
Cr-Commit-Position: refs/heads/master@{#15197}
This commit is contained in:
peah
2016-11-22 07:24:52 -08:00
committed by Commit bot
parent 30a12fbbb9
commit 8271d04009
17 changed files with 191 additions and 172 deletions

View File

@ -185,7 +185,10 @@ void EnableAllAPComponents(AudioProcessing* ap) {
EXPECT_NOERR(ap->gain_control()->Enable(true));
#endif
EXPECT_NOERR(ap->high_pass_filter()->Enable(true));
AudioProcessing::Config apm_config;
apm_config.high_pass_filter.enabled = true;
ap->ApplyConfig(apm_config);
EXPECT_NOERR(ap->level_estimator()->Enable(true));
EXPECT_NOERR(ap->noise_suppression()->Enable(true));
@ -1391,10 +1394,11 @@ TEST_F(ApmTest, NoiseSuppression) {
TEST_F(ApmTest, HighPassFilter) {
// Turn HP filter on/off
EXPECT_EQ(apm_->kNoError, apm_->high_pass_filter()->Enable(true));
EXPECT_TRUE(apm_->high_pass_filter()->is_enabled());
EXPECT_EQ(apm_->kNoError, apm_->high_pass_filter()->Enable(false));
EXPECT_FALSE(apm_->high_pass_filter()->is_enabled());
AudioProcessing::Config apm_config;
apm_config.high_pass_filter.enabled = true;
apm_->ApplyConfig(apm_config);
apm_config.high_pass_filter.enabled = false;
apm_->ApplyConfig(apm_config);
}
TEST_F(ApmTest, LevelEstimator) {