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}
This commit is contained in:
Hanna Silen 2024-08-09 14:49:20 +03:00 committed by WebRTC LUCI CQ
parent 6cb7b3a424
commit cc5c549fac
3 changed files with 1 additions and 43 deletions

View File

@ -221,6 +221,7 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface {
bool analyze_linear_aec_output_when_available = false; bool analyze_linear_aec_output_when_available = false;
} noise_suppression; } noise_suppression;
// TODO(bugs.webrtc.org/357281131): Deprecated. Stop using and remove.
// Enables transient suppression. // Enables transient suppression.
struct TransientSuppression { struct TransientSuppression {
bool enabled = false; bool enabled = false;

View File

@ -471,10 +471,6 @@ AudioProcessingImpl::AudioProcessingImpl(
RTC_LOG(LS_INFO) << "Denormal disabler unsupported"; 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(); RTC_LOG(LS_INFO) << "AudioProcessing: " << config_.ToString();
// Mark Echo Controller enabled if a factory is injected. // Mark Echo Controller enabled if a factory is injected.
@ -710,10 +706,6 @@ void AudioProcessingImpl::ApplyConfig(const AudioProcessing::Config& config) {
config_ = config; 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) { if (aec_config_changed) {
InitializeEchoController(); InitializeEchoController();
} }
@ -2186,9 +2178,6 @@ void AudioProcessingImpl::WriteAecDumpConfigMessage(bool forced) {
apm_config.ns_enabled = config_.noise_suppression.enabled; apm_config.ns_enabled = config_.noise_suppression.enabled;
apm_config.ns_level = static_cast<int>(config_.noise_suppression.level); 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.experiments_description = experiments_description;
apm_config.pre_amplifier_enabled = config_.pre_amplifier.enabled; apm_config.pre_amplifier_enabled = config_.pre_amplifier.enabled;
apm_config.pre_amplifier_fixed_gain_factor = apm_config.pre_amplifier_fixed_gain_factor =

View File

@ -959,36 +959,4 @@ INSTANTIATE_TEST_SUITE_P(
.input_volume_controller = {.enabled = true}, .input_volume_controller = {.enabled = true},
.adaptive_digital = {.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 } // namespace webrtc