diff --git a/modules/audio_processing/aec3/echo_remover.cc b/modules/audio_processing/aec3/echo_remover.cc index 1ae9a8b4a6..cb24248292 100644 --- a/modules/audio_processing/aec3/echo_remover.cc +++ b/modules/audio_processing/aec3/echo_remover.cc @@ -299,7 +299,7 @@ void EchoRemoverImpl::ProcessCapture( [](float a, float b) { return std::min(a, b); }); suppression_gain_.GetGain(E2, E2_bounded, echo_spectrum, R2, - cng_.NoiseSpectrum(), E, Y, render_signal_analyzer_, + cng_.NoiseSpectrum(), render_signal_analyzer_, aec_state_, x, &high_bands_gain, &G); suppression_filter_.ApplyGain(comfort_noise, high_band_comfort_noise, G, diff --git a/modules/audio_processing/aec3/suppression_gain.cc b/modules/audio_processing/aec3/suppression_gain.cc index e258682817..935980f6f1 100644 --- a/modules/audio_processing/aec3/suppression_gain.cc +++ b/modules/audio_processing/aec3/suppression_gain.cc @@ -316,8 +316,6 @@ void SuppressionGain::GetGain( const std::array& echo_spectrum, const std::array& residual_echo_spectrum, const std::array& comfort_noise_spectrum, - const FftData& linear_aec_fft, - const FftData& capture_fft, const RenderSignalAnalyzer& render_signal_analyzer, const AecState& aec_state, const std::vector>& render, diff --git a/modules/audio_processing/aec3/suppression_gain.h b/modules/audio_processing/aec3/suppression_gain.h index 9e33c28766..317f43c5f0 100644 --- a/modules/audio_processing/aec3/suppression_gain.h +++ b/modules/audio_processing/aec3/suppression_gain.h @@ -40,8 +40,6 @@ class SuppressionGain { const std::array& echo_spectrum, const std::array& residual_echo_spectrum, const std::array& comfort_noise_spectrum, - const FftData& linear_aec_fft, - const FftData& capture_fft, const RenderSignalAnalyzer& render_signal_analyzer, const AecState& aec_state, const std::vector>& render, diff --git a/modules/audio_processing/aec3/suppression_gain_unittest.cc b/modules/audio_processing/aec3/suppression_gain_unittest.cc index 1ff96ca6e0..fc721fe009 100644 --- a/modules/audio_processing/aec3/suppression_gain_unittest.cc +++ b/modules/audio_processing/aec3/suppression_gain_unittest.cc @@ -45,7 +45,7 @@ TEST(SuppressionGain, NullOutputGains) { AecState aec_state(EchoCanceller3Config{}); EXPECT_DEATH( SuppressionGain(EchoCanceller3Config{}, DetectOptimization(), 16000) - .GetGain(E2, E2, S2, R2, N2, E, Y, + .GetGain(E2, E2, S2, R2, N2, RenderSignalAnalyzer((EchoCanceller3Config{})), aec_state, std::vector>( 3, std::vector(kBlockSize, 0.f)), @@ -69,8 +69,6 @@ TEST(SuppressionGain, BasicGainComputation) { std::array g; SubtractorOutput output; std::array y; - FftData E; - FftData Y; std::vector> x(1, std::vector(kBlockSize, 0.f)); EchoCanceller3Config config; AecState aec_state(config); @@ -88,10 +86,6 @@ TEST(SuppressionGain, BasicGainComputation) { N2.fill(100.f); output.Reset(); y.fill(0.f); - E.re.fill(sqrtf(E2[0])); - E.im.fill(0.f); - Y.re.fill(sqrtf(Y2[0])); - Y.im.fill(0.f); // Ensure that the gain is no longer forced to zero. for (int k = 0; k <= kNumBlocksPerSecond / 5 + 1; ++k) { @@ -106,7 +100,7 @@ TEST(SuppressionGain, BasicGainComputation) { subtractor.FilterImpulseResponse(), *render_delay_buffer->GetRenderBuffer(), E2, Y2, output, y); - suppression_gain.GetGain(E2, E2, S2, R2, N2, E, Y, analyzer, aec_state, x, + suppression_gain.GetGain(E2, E2, S2, R2, N2, analyzer, aec_state, x, &high_bands_gain, &g); } std::for_each(g.begin(), g.end(), @@ -118,15 +112,13 @@ TEST(SuppressionGain, BasicGainComputation) { R2.fill(0.1f); S2.fill(0.1f); N2.fill(0.f); - E.re.fill(sqrtf(E2[0])); - Y.re.fill(sqrtf(Y2[0])); for (int k = 0; k < 100; ++k) { aec_state.Update(delay_estimate, subtractor.FilterFrequencyResponse(), subtractor.FilterImpulseResponse(), *render_delay_buffer->GetRenderBuffer(), E2, Y2, output, y); - suppression_gain.GetGain(E2, E2, S2, R2, N2, E, Y, analyzer, aec_state, x, + suppression_gain.GetGain(E2, E2, S2, R2, N2, analyzer, aec_state, x, &high_bands_gain, &g); } std::for_each(g.begin(), g.end(), @@ -135,10 +127,9 @@ TEST(SuppressionGain, BasicGainComputation) { // Ensure that a strong echo is suppressed. E2.fill(1000000000.f); R2.fill(10000000000000.f); - E.re.fill(sqrtf(E2[0])); for (int k = 0; k < 10; ++k) { - suppression_gain.GetGain(E2, E2, S2, R2, N2, E, Y, analyzer, aec_state, x, + suppression_gain.GetGain(E2, E2, S2, R2, N2, analyzer, aec_state, x, &high_bands_gain, &g); } std::for_each(g.begin(), g.end(),