Remove AudioProcessing::gain_control() getter This change also resolves a bug in audioproc_f: The implicit ApplyConfig calls to enable gain control settings in aec_dump_simulator.cc:377-406 [1] are overwritten by the ApplyConfig call on line 500 using a config from line 292. Compared to a ToT build including a fix for that bug, these changes are bitexact on a large number of aecdumps. [1] https://cs.chromium.org/chromium/src/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc?l=377&rcl=8bbf9e2c6e40feb8efcbf276b43945a14d651e9b Bug: webrtc:9878 Change-Id: Id427d34e838c999d996d58193977ac2a9198edd6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156463 Commit-Queue: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29481}
diff --git a/modules/audio_processing/test/debug_dump_test.cc b/modules/audio_processing/test/debug_dump_test.cc index ff08e5d..b769a66 100644 --- a/modules/audio_processing/test/debug_dump_test.cc +++ b/modules/audio_processing/test/debug_dump_test.cc
@@ -529,8 +529,9 @@ generator.StartRecording(); generator.Process(100); - GainControl* agc = generator.apm()->gain_control(); - EXPECT_EQ(AudioProcessing::kNoError, agc->Enable(!agc->is_enabled())); + AudioProcessing::Config apm_config = generator.apm()->GetConfig(); + apm_config.gain_controller1.enabled = !apm_config.gain_controller1.enabled; + generator.apm()->ApplyConfig(apm_config); generator.Process(100); generator.StopRecording();