Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Unified Diff: webrtc/modules/audio_processing/audio_processing_unittest.cc

Issue 2415403002: Introduced the new parameter setting scheme for activating the high-pass filter in APM (Closed)
Patch Set: Changes in response to reviewer comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/audio_processing_unittest.cc
diff --git a/webrtc/modules/audio_processing/audio_processing_unittest.cc b/webrtc/modules/audio_processing/audio_processing_unittest.cc
index 139aa9daafa534d29a11e2e8bf53832609f0e24d..c5f01f96fbeb8b0645cce17beabb456cdcc2250e 100644
--- a/webrtc/modules/audio_processing/audio_processing_unittest.cc
+++ b/webrtc/modules/audio_processing/audio_processing_unittest.cc
@@ -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) {
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/high_pass_filter_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698