Mark ios_force_software_aec_HACK as deprecated Bug: webrtc:42233827 Change-Id: I10176556367234552a3db991af4591fa8cf8955f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/476580 Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Commit-Queue: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47845}
diff --git a/api/audio_options.cc b/api/audio_options.cc index 4dca717..faab98d 100644 --- a/api/audio_options.cc +++ b/api/audio_options.cc
@@ -42,7 +42,10 @@ void AudioOptions::SetAll(const AudioOptions& change) { SetFrom(&echo_cancellation, change.echo_cancellation); #if defined(WEBRTC_IOS) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SetFrom(&ios_force_software_aec_HACK, change.ios_force_software_aec_HACK); +#pragma clang diagnostic pop #endif SetFrom(&auto_gain_control, change.auto_gain_control); SetFrom(&noise_suppression, change.noise_suppression); @@ -62,7 +65,10 @@ bool AudioOptions::operator==(const AudioOptions& o) const { return echo_cancellation == o.echo_cancellation && #if defined(WEBRTC_IOS) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" ios_force_software_aec_HACK == o.ios_force_software_aec_HACK && +#pragma clang diagnostic pop #endif auto_gain_control == o.auto_gain_control && noise_suppression == o.noise_suppression && @@ -83,8 +89,11 @@ result << "AudioOptions {"; ToStringIfSet(&result, "aec", echo_cancellation); #if defined(WEBRTC_IOS) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" ToStringIfSet(&result, "ios_force_software_aec_HACK", ios_force_software_aec_HACK); +#pragma clang diagnostic pop #endif ToStringIfSet(&result, "agc", auto_gain_control); ToStringIfSet(&result, "ns", noise_suppression);
diff --git a/api/audio_options.h b/api/audio_options.h index 6d4ad0b..4a80a92 100644 --- a/api/audio_options.h +++ b/api/audio_options.h
@@ -40,7 +40,7 @@ // (until Apple fixes the bug) for a device with non-functioning AEC. May // improve performance on that particular device, but will cause unpredictable // behavior in all other cases. See http://bugs.webrtc.org/8682. - std::optional<bool> ios_force_software_aec_HACK; + [[deprecated]] std::optional<bool> ios_force_software_aec_HACK; #endif // Audio processing to adjust the sensitivity of the local mic dynamically. std::optional<bool> auto_gain_control;
diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc index 920d7cc..215b6b0 100644 --- a/media/engine/webrtc_voice_engine.cc +++ b/media/engine/webrtc_voice_engine.cc
@@ -617,8 +617,11 @@ AudioOptions options = options_in; // The options are modified below. #if defined(WEBRTC_IOS) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" if (options.ios_force_software_aec_HACK && *options.ios_force_software_aec_HACK) { +#pragma clang diagnostic pop // EC may be forced on for a device known to have non-functioning platform // AEC. options.echo_cancellation = true;