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

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

Issue 1678813002: Moved the GainControlForNewAGC class to a separate file. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changed the locking test to match how the gain control is used in practice and to comply with the n… Created 4 years, 10 months 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_impl_locking_unittest.cc
diff --git a/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc b/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc
index 3d2c71fb2dbef38993eef42054aa2b27db9e6f23..52c5643d2db670fab5bf7516addc5efa4ab23a88 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc
@@ -596,7 +596,6 @@ bool StatsProcessor::Process() {
(test_config_->aec_type ==
AecType::BasicWebRtcAecSettingsWithAecMobile));
EXPECT_TRUE(apm_->gain_control()->is_enabled());
- apm_->gain_control()->stream_analog_level();
EXPECT_TRUE(apm_->noise_suppression()->is_enabled());
// The below return values are not testable.
@@ -709,9 +708,12 @@ void CaptureProcessor::CallApmCaptureSide() {
// Prepare a proper capture side processing API call input.
PrepareFrame();
- // Set the stream delay
+ // Set the stream delay.
apm_->set_stream_delay_ms(30);
+ // Set the analog level.
+ apm_->gain_control()->set_stream_analog_level(80);
+
// Call the specified capture side API processing method.
int result = AudioProcessing::kNoError;
switch (test_config_->capture_api_function) {
@@ -734,6 +736,9 @@ void CaptureProcessor::CallApmCaptureSide() {
FAIL();
}
+ // Retrieve the new analog level.
+ apm_->gain_control()->stream_analog_level();
the sun 2016/02/09 11:49:55 Just for testing? It's a bit confusing that you sa
peah-webrtc 2016/02/10 09:33:37 The problem with that is that the purpose is not a
+
// Check the return code for error.
ASSERT_EQ(AudioProcessing::kNoError, result);
}

Powered by Google App Engine
This is Rietveld 408576698