| Index: webrtc/modules/audio_processing/echo_cancellation_impl.cc
|
| diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl.cc b/webrtc/modules/audio_processing/echo_cancellation_impl.cc
|
| index 1422cb8d72791e4d5d2c2ee3108cbb9851deb581..07f96fa170564a189256b3e4da77826f7a81ba3b 100644
|
| --- a/webrtc/modules/audio_processing/echo_cancellation_impl.cc
|
| +++ b/webrtc/modules/audio_processing/echo_cancellation_impl.cc
|
| @@ -59,10 +59,14 @@ const size_t EchoCancellationImpl::kAllowedValuesOfSamplesPerFrame1;
|
| const size_t EchoCancellationImpl::kAllowedValuesOfSamplesPerFrame2;
|
|
|
| EchoCancellationImpl::EchoCancellationImpl(const AudioProcessing* apm,
|
| - CriticalSectionWrapper* crit)
|
| + CriticalSectionWrapper* crit,
|
| + rtc::ThreadChecker* render_thread,
|
| + rtc::ThreadChecker* capture_thread)
|
| : ProcessingComponent(),
|
| apm_(apm),
|
| crit_(crit),
|
| + render_thread_(render_thread),
|
| + capture_thread_(capture_thread),
|
| drift_compensation_enabled_(false),
|
| metrics_enabled_(false),
|
| suppression_level_(kModerateSuppression),
|
| @@ -79,6 +83,7 @@ EchoCancellationImpl::EchoCancellationImpl(const AudioProcessing* apm,
|
| EchoCancellationImpl::~EchoCancellationImpl() {}
|
|
|
| int EchoCancellationImpl::ProcessRenderAudio(const AudioBuffer* audio) {
|
| + RTC_DCHECK(render_thread_->CalledOnValidThread());
|
| if (!is_component_enabled()) {
|
| return apm_->kNoError;
|
| }
|
| @@ -128,6 +133,7 @@ int EchoCancellationImpl::ProcessRenderAudio(const AudioBuffer* audio) {
|
| // Read chunks of data that were received and queued on the render side from
|
| // a queue. All the data chunks are buffered into the farend signal of the AEC.
|
| void EchoCancellationImpl::ReadQueuedRenderData() {
|
| + RTC_DCHECK(capture_thread_->CalledOnValidThread());
|
| if (!is_component_enabled()) {
|
| return;
|
| }
|
| @@ -155,6 +161,7 @@ void EchoCancellationImpl::ReadQueuedRenderData() {
|
| }
|
|
|
| int EchoCancellationImpl::ProcessCaptureAudio(AudioBuffer* audio) {
|
| + RTC_DCHECK(capture_thread_->CalledOnValidThread());
|
| if (!is_component_enabled()) {
|
| return apm_->kNoError;
|
| }
|
| @@ -445,6 +452,7 @@ int EchoCancellationImpl::ConfigureHandle(void* handle) const {
|
| config.nlpMode = MapSetting(suppression_level_);
|
| config.skewMode = drift_compensation_enabled_;
|
| config.delay_logging = delay_logging_enabled_;
|
| +
|
| WebRtcAec_enable_extended_filter(
|
| WebRtcAec_aec_core(static_cast<Handle*>(handle)),
|
| extended_filter_enabled_ ? 1 : 0);
|
|
|