OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |