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) { |
+ 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() { |
} |
} |
peah-webrtc
2016/03/11 11:34:39
Regarding proc_split_sample_rate_hz(), can that ev
aluebs-webrtc
2016/03/11 13:27:05
As it is today, it is always 16kHz except when the
peah-webrtc
2016/03/11 21:37:28
We really need to change the names of these functi
aluebs-webrtc
2016/03/14 17:30:40
I agree it probably can have a better name, but th
|
- 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) { |