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

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

Issue 1571013002: Remove additional channel constraints when Beamforming is enabled in AudioProcessing (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebasing Created 4 years, 11 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 if (!apm_->was_stream_delay_set()) { 168 if (!apm_->was_stream_delay_set()) {
169 return AudioProcessing::kStreamParameterNotSetError; 169 return AudioProcessing::kStreamParameterNotSetError;
170 } 170 }
171 171
172 if (drift_compensation_enabled_ && !was_stream_drift_set_) { 172 if (drift_compensation_enabled_ && !was_stream_drift_set_) {
173 return AudioProcessing::kStreamParameterNotSetError; 173 return AudioProcessing::kStreamParameterNotSetError;
174 } 174 }
175 175
176 assert(audio->num_frames_per_band() <= 160); 176 assert(audio->num_frames_per_band() <= 160);
177 assert(audio->num_channels() == apm_->num_output_channels()); 177 assert(audio->num_channels() == apm_->num_proc_channels());
178 178
179 int err = AudioProcessing::kNoError; 179 int err = AudioProcessing::kNoError;
180 180
181 // The ordering convention must be followed to pass to the correct AEC. 181 // The ordering convention must be followed to pass to the correct AEC.
182 size_t handle_index = 0; 182 size_t handle_index = 0;
183 stream_has_echo_ = false; 183 stream_has_echo_ = false;
184 for (int i = 0; i < audio->num_channels(); i++) { 184 for (int i = 0; i < audio->num_channels(); i++) {
185 for (int j = 0; j < apm_->num_reverse_channels(); j++) { 185 for (int j = 0; j < apm_->num_reverse_channels(); j++) {
186 Handle* my_handle = handle(handle_index); 186 Handle* my_handle = handle(handle_index);
187 err = WebRtcAec_Process(my_handle, audio->split_bands_const_f(i), 187 err = WebRtcAec_Process(my_handle, audio->split_bands_const_f(i),
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 // Not locked as it only relies on APM public API which is threadsafe. 493 // Not locked as it only relies on APM public API which is threadsafe.
494 return apm_->num_output_channels() * apm_->num_reverse_channels(); 494 return apm_->num_output_channels() * apm_->num_reverse_channels();
495 } 495 }
496 496
497 int EchoCancellationImpl::GetHandleError(void* handle) const { 497 int EchoCancellationImpl::GetHandleError(void* handle) const {
498 // Not locked as it does not rely on anything in the state. 498 // Not locked as it does not rely on anything in the state.
499 assert(handle != NULL); 499 assert(handle != NULL);
500 return AudioProcessing::kUnspecifiedError; 500 return AudioProcessing::kUnspecifiedError;
501 } 501 }
502 } // namespace webrtc 502 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/gain_control_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698