Index: webrtc/modules/audio_processing/audio_processing_impl.cc |
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc |
index ff4128b6ed4485df0d5abef47a2ff006da53a6b5..bdeafb2f2d70d93c659b1e0badedf3f387c4cffb 100644 |
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc |
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc |
@@ -34,6 +34,7 @@ extern "C" { |
#include "webrtc/modules/audio_processing/level_estimator_impl.h" |
#include "webrtc/modules/audio_processing/noise_suppression_impl.h" |
#include "webrtc/modules/audio_processing/processing_component.h" |
+#include "webrtc/modules/audio_processing/repetition_detector.h" |
#include "webrtc/modules/audio_processing/transient/transient_suppressor.h" |
#include "webrtc/modules/audio_processing/voice_detection_impl.h" |
#include "webrtc/modules/interface/module_common_types.h" |
@@ -214,6 +215,7 @@ AudioProcessingImpl::AudioProcessingImpl(const Config& config, |
beamformer_enabled_(config.Get<Beamforming>().enabled), |
beamformer_(beamformer), |
array_geometry_(config.Get<Beamforming>().array_geometry), |
+ repetition_detector_(new RepetitionDetector()), |
intelligibility_enabled_(config.Get<Intelligibility>().enabled) { |
echo_cancellation_ = new EchoCancellationImpl(this, crit_); |
component_list_.push_back(echo_cancellation_); |
@@ -530,6 +532,11 @@ int AudioProcessingImpl::ProcessStream(const float* const* src, |
if (samples_per_channel != input_stream.num_frames()) { |
return kBadDataLengthError; |
} |
+ |
+ // Check only one channel. |
+ repetition_detector_->Detect(src[0], samples_per_channel, 1, |
+ input_sample_rate_hz); |
+ |
return ProcessStream(src, input_stream, output_stream, dest); |
} |