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

Side by Side Diff: webrtc/modules/audio_processing/echo_control_mobile_impl.cc

Issue 1777093004: Reland: 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: Rebasing 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 err = WebRtcAecm_Process(cancellers_[handle_index]->state(), noisy, clean, 236 err = WebRtcAecm_Process(cancellers_[handle_index]->state(), noisy, clean,
237 audio->split_bands(capture)[kBand0To8kHz], 237 audio->split_bands(capture)[kBand0To8kHz],
238 audio->num_frames_per_band(), stream_delay_ms); 238 audio->num_frames_per_band(), stream_delay_ms);
239 239
240 if (err != AudioProcessing::kNoError) { 240 if (err != AudioProcessing::kNoError) {
241 return MapError(err); 241 return MapError(err);
242 } 242 }
243 243
244 ++handle_index; 244 ++handle_index;
245 } 245 }
246 for (size_t band = 1u; band < audio->num_bands(); ++band) {
247 memset(audio->split_bands(capture)[band],
248 0,
249 audio->num_frames_per_band() *
250 sizeof(audio->split_bands(capture)[band][0]));
251 }
246 } 252 }
247 return AudioProcessing::kNoError; 253 return AudioProcessing::kNoError;
248 } 254 }
249 255
250 int EchoControlMobileImpl::Enable(bool enable) { 256 int EchoControlMobileImpl::Enable(bool enable) {
251 // Ensure AEC and AECM are not both enabled. 257 // Ensure AEC and AECM are not both enabled.
252 rtc::CritScope cs_render(crit_render_); 258 rtc::CritScope cs_render(crit_render_);
253 rtc::CritScope cs_capture(crit_capture_); 259 rtc::CritScope cs_capture(crit_capture_);
254 RTC_DCHECK(stream_properties_); 260 RTC_DCHECK(stream_properties_);
255 261
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 439 }
434 return error; 440 return error;
435 } 441 }
436 442
437 size_t EchoControlMobileImpl::num_handles_required() const { 443 size_t EchoControlMobileImpl::num_handles_required() const {
438 RTC_DCHECK(stream_properties_); 444 RTC_DCHECK(stream_properties_);
439 return stream_properties_->num_output_channels * 445 return stream_properties_->num_output_channels *
440 stream_properties_->num_reverse_channels; 446 stream_properties_->num_reverse_channels;
441 } 447 }
442 } // namespace webrtc 448 } // namespace webrtc
OLDNEW
« 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