Deprecate TransientSuppression
APM transient suppression config has no impact after
https://webrtc-review.googlesource.com/c/src/+/355880.
Bug: webrtc:7494, webrtc:13663, webrtc:357281131
Change-Id: I5017995aad4f89108b7de46e58df1cd391f61734
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358865
Reviewed-by: Per Ã…hgren <peah@webrtc.org>
Commit-Queue: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42752}
diff --git a/api/audio/audio_processing.h b/api/audio/audio_processing.h
index d5cdb44..19eab84 100644
--- a/api/audio/audio_processing.h
+++ b/api/audio/audio_processing.h
@@ -221,6 +221,7 @@
bool analyze_linear_aec_output_when_available = false;
} noise_suppression;
+ // TODO(bugs.webrtc.org/357281131): Deprecated. Stop using and remove.
// Enables transient suppression.
struct TransientSuppression {
bool enabled = false;
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc
index f093e5f..9a831d9 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -471,10 +471,6 @@
RTC_LOG(LS_INFO) << "Denormal disabler unsupported";
}
- // TODO(bugs.webrtc.org/7494): Remove transient suppression from the config.
- // Disable for clarity; enabling transient suppression has no effect.
- config_.transient_suppression.enabled = false;
-
RTC_LOG(LS_INFO) << "AudioProcessing: " << config_.ToString();
// Mark Echo Controller enabled if a factory is injected.
@@ -710,10 +706,6 @@
config_ = config;
- // TODO(bugs.webrtc.org/7494): Remove transient suppression from the config.
- // Disable for clarity; enabling transient suppression has no effect.
- config_.transient_suppression.enabled = false;
-
if (aec_config_changed) {
InitializeEchoController();
}
@@ -2186,9 +2178,6 @@
apm_config.ns_enabled = config_.noise_suppression.enabled;
apm_config.ns_level = static_cast<int>(config_.noise_suppression.level);
- // TODO(bugs.webrtc.org/7494): Remove transient suppression from the config.
- // Disable for clarity; enabling transient suppression has no effect.
- apm_config.transient_suppression_enabled = false;
apm_config.experiments_description = experiments_description;
apm_config.pre_amplifier_enabled = config_.pre_amplifier.enabled;
apm_config.pre_amplifier_fixed_gain_factor =
diff --git a/modules/audio_processing/audio_processing_impl_unittest.cc b/modules/audio_processing/audio_processing_impl_unittest.cc
index 2cfddaf..82e6550 100644
--- a/modules/audio_processing/audio_processing_impl_unittest.cc
+++ b/modules/audio_processing/audio_processing_impl_unittest.cc
@@ -959,36 +959,4 @@
.input_volume_controller = {.enabled = true},
.adaptive_digital = {.enabled = true}}}));
-TEST(AudioProcessingImplTest, CanDisableTransientSuppressor) {
- constexpr AudioProcessing::Config kOriginal = {
- .transient_suppression = {.enabled = false}};
-
- // Test config application via `AudioProcessing` ctor.
- auto adjusted =
- AudioProcessingBuilder().SetConfig(kOriginal).Create()->GetConfig();
- EXPECT_FALSE(adjusted.transient_suppression.enabled);
-
- // Test config application via `AudioProcessing::ApplyConfig()`.
- auto apm = AudioProcessingBuilder().Create();
- apm->ApplyConfig(kOriginal);
- adjusted = apm->GetConfig();
- EXPECT_FALSE(apm->GetConfig().transient_suppression.enabled);
-}
-
-TEST(AudioProcessingImplTest, CannotEnableTs) {
- constexpr AudioProcessing::Config kOriginal = {
- .transient_suppression = {.enabled = true}};
-
- // Test config application via `AudioProcessing` ctor.
- auto adjusted =
- AudioProcessingBuilder().SetConfig(kOriginal).Create()->GetConfig();
- EXPECT_FALSE(adjusted.transient_suppression.enabled);
-
- // Test config application via `AudioProcessing::ApplyConfig()`.
- auto apm = AudioProcessingBuilder().Create();
- apm->ApplyConfig(kOriginal);
- adjusted = apm->GetConfig();
- EXPECT_FALSE(adjusted.transient_suppression.enabled);
-}
-
} // namespace webrtc