Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: webrtc/modules/audio_processing/audio_processing_impl.cc

Issue 1287663002: Adding audio RepetitionDetector in AudioProcessingModule. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 bbfb771182cc7196f0e8e0ca9fb63860617d6b8f..c0ed806d98d892ffebca4c68ef26a9601fb08d80 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -32,6 +32,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"
@@ -210,7 +211,8 @@ AudioProcessingImpl::AudioProcessingImpl(const Config& config,
#endif
beamformer_enabled_(config.Get<Beamforming>().enabled),
beamformer_(beamformer),
- array_geometry_(config.Get<Beamforming>().array_geometry) {
+ array_geometry_(config.Get<Beamforming>().array_geometry),
+ repetition_detector_(new RepetitionDetector()) {
Andrew MacDonald 2015/08/11 18:53:05 We usually lazily initialize components, so you wo
minyue-webrtc 2015/08/12 11:32:13 Acknowledged.
echo_cancellation_ = new EchoCancellationImpl(this, crit_);
component_list_.push_back(echo_cancellation_);
@@ -569,6 +571,9 @@ int AudioProcessingImpl::ProcessStream(AudioFrame* frame) {
return kUnsupportedComponentError;
}
+ repetition_detector_->Detect(frame->data_, frame->samples_per_channel_,
Andrew MacDonald 2015/08/11 20:50:42 All processing/analysis should be done in ProcessS
minyue-webrtc 2015/08/12 11:32:13 We'd better access raw data (frame), ProcessStream
Andrew MacDonald 2015/08/12 20:25:32 See how the other components access the data (thro
peah-webrtc 2015/08/12 21:05:16 That makes sense. I today looked into a recording
+ frame->num_channels_);
+
// TODO(ajm): The input and output rates and channels are currently
// constrained to be identical in the int16 interface.
ProcessingConfig processing_config = api_format_;
@@ -623,6 +628,7 @@ int AudioProcessingImpl::ProcessStreamLocked() {
MaybeUpdateHistograms();
AudioBuffer* ca = capture_audio_.get(); // For brevity.
+
hlundin-webrtc 2015/08/12 14:12:04 Why new line?
if (use_new_agc_ && gain_control_->is_enabled()) {
agc_manager_->AnalyzePreProcess(ca->channels()[0], ca->num_channels(),
fwd_proc_format_.num_frames());

Powered by Google App Engine
This is Rietveld 408576698