Convert IntelligibilityEnhancer to multi-threaded mode
BUG=581029
R=henrik.lundin@webrtc.org, peah@webrtc.org, turaj@webrtc.org
Review URL: https://codereview.webrtc.org/1766383002 .
Cr-Commit-Position: refs/heads/master@{#11929}
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
index e849822..7715134 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -920,10 +920,6 @@
}
if (constants_.intelligibility_enabled) {
- // Currently run in single-threaded mode when the intelligibility
- // enhancer is activated.
- // TODO(peah): Fix to be properly multi-threaded.
- rtc::CritScope cs(&crit_capture_);
public_submodules_->intelligibility_enhancer->ProcessRenderAudio(
ra->split_channels_f(kBand0To8kHz), capture_nonlocked_.split_rate,
ra->num_channels());
@@ -1235,7 +1231,8 @@
if (constants_.intelligibility_enabled) {
public_submodules_->intelligibility_enhancer.reset(
new IntelligibilityEnhancer(capture_nonlocked_.split_rate,
- render_.render_audio->num_channels()));
+ render_.render_audio->num_channels(),
+ NoiseSuppressionImpl::num_noise_bins()));
}
}