Removing the use of the soon-to-be-removed echo_cancellation_impl
api function that directly returns aec_core.
BUG=webrtc:5201
Review URL: https://codereview.webrtc.org/1695743004
Cr-Commit-Position: refs/heads/master@{#11875}
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
index dbc04b7..a92f13c 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -1288,10 +1288,12 @@
capture_.last_stream_delay_ms = capture_nonlocked_.stream_delay_ms;
// Detect a jump in AEC system delay and log the difference.
- const int frames_per_ms =
+ const int samples_per_ms =
rtc::CheckedDivExact(capture_nonlocked_.split_rate, 1000);
+ RTC_DCHECK_LT(0, samples_per_ms);
const int aec_system_delay_ms =
- WebRtcAec_system_delay(echo_cancellation()->aec_core()) / frames_per_ms;
+ public_submodules_->echo_cancellation->GetSystemDelayInSamples() /
+ samples_per_ms;
const int diff_aec_system_delay_ms =
aec_system_delay_ms - capture_.last_aec_system_delay_ms;
if (diff_aec_system_delay_ms > kMinDiffDelayMs &&