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

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

Issue 2419563003: Add algorithm for Residual Echo Detector. (Closed)
Patch Set: Added comments. Created 4 years, 2 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/residual_echo_detector.cc
diff --git a/webrtc/modules/audio_processing/residual_echo_detector.cc b/webrtc/modules/audio_processing/residual_echo_detector.cc
index 9586c15494ef93e7387c2f75e971c49862e19eca..9ac32e7312e51bb64c53b5a48ed9e66d4ab5c3a4 100644
--- a/webrtc/modules/audio_processing/residual_echo_detector.cc
+++ b/webrtc/modules/audio_processing/residual_echo_detector.cc
@@ -45,19 +45,14 @@ void ResidualEchoDetector::AnalyzeCaptureAudio(const AudioBuffer* audio) {
audio->num_frames_per_band()));
}
-void ResidualEchoDetector::Initialize(int sample_rate_hz) {
- RTC_DCHECK(sample_rate_hz == AudioProcessing::kSampleRate8kHz ||
- sample_rate_hz == AudioProcessing::kSampleRate16kHz ||
- sample_rate_hz == AudioProcessing::kSampleRate32kHz ||
- sample_rate_hz == AudioProcessing::kSampleRate48kHz);
-
- detector_->Initialize(sample_rate_hz);
+void ResidualEchoDetector::Initialize() {
+ detector_->Initialize();
}
void ResidualEchoDetector::ReadQueuedRenderData() {
while (render_signal_queue_->Remove(&capture_queue_buffer_)) {
const size_t num_frames_per_band = capture_queue_buffer_.size();
- detector_->BufferFarend(rtc::ArrayView<const float>(
+ detector_->BufferRender(rtc::ArrayView<const float>(
capture_queue_buffer_.data(), num_frames_per_band));
}
}

Powered by Google App Engine
This is Rietveld 408576698