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

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

Issue 1774553002: Drop the 16kHz sample rate restriction on AECM and zero out higher bands (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix error message Created 4 years, 9 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/echo_control_mobile_impl.cc
diff --git a/webrtc/modules/audio_processing/echo_control_mobile_impl.cc b/webrtc/modules/audio_processing/echo_control_mobile_impl.cc
index f2df5f79849f7fb98a85022506c4cceb26423588..7c6760d666e44179e980348eb84ae0679f09a330 100644
--- a/webrtc/modules/audio_processing/echo_control_mobile_impl.cc
+++ b/webrtc/modules/audio_processing/echo_control_mobile_impl.cc
@@ -206,6 +206,12 @@ int EchoControlMobileImpl::ProcessCaptureAudio(AudioBuffer* audio) {
handle_index++;
}
+ for (size_t band = 1u; band < audio->num_bands(); ++band) {
the sun 2016/03/09 14:58:21 do you really need the 'u' in 1u?
aluebs-webrtc 2016/03/09 15:23:20 I am never sure if it is needed for VisualStudio c
+ memset(audio->split_bands(i)[band],
+ 0,
+ audio->num_frames_per_band() *
+ sizeof(audio->split_bands(i)[band][0]));
+ }
}
return AudioProcessing::kNoError;
@@ -313,8 +319,8 @@ int EchoControlMobileImpl::Initialize() {
}
}
- if (apm_->proc_sample_rate_hz() > AudioProcessing::kSampleRate16kHz) {
- LOG(LS_ERROR) << "AECM only supports 16 kHz or lower sample rates";
+ if (apm_->proc_split_sample_rate_hz() > AudioProcessing::kSampleRate16kHz) {
+ LOG(LS_ERROR) << "AECM only supports 16 kHz or lower split sample rates";
return AudioProcessing::kBadSampleRateError;
}
@@ -370,7 +376,7 @@ int EchoControlMobileImpl::InitializeHandle(void* handle) const {
rtc::CritScope cs_capture(crit_capture_);
assert(handle != NULL);
Handle* my_handle = static_cast<Handle*>(handle);
- if (WebRtcAecm_Init(my_handle, apm_->proc_sample_rate_hz()) != 0) {
+ if (WebRtcAecm_Init(my_handle, apm_->proc_split_sample_rate_hz()) != 0) {
return GetHandleError(my_handle);
}
if (external_echo_path_ != NULL) {
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/include/audio_processing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698