| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 int EchoCancellationImpl::Initialize() { | 321 int EchoCancellationImpl::Initialize() { |
| 322 int err = ProcessingComponent::Initialize(); | 322 int err = ProcessingComponent::Initialize(); |
| 323 if (err != apm_->kNoError || !is_component_enabled()) { | 323 if (err != apm_->kNoError || !is_component_enabled()) { |
| 324 return err; | 324 return err; |
| 325 } | 325 } |
| 326 | 326 |
| 327 return apm_->kNoError; | 327 return apm_->kNoError; |
| 328 } | 328 } |
| 329 | 329 |
| 330 void EchoCancellationImpl::SetExtraOptions(const Config& config) { | 330 void EchoCancellationImpl::SetExtraOptions(const Config& config) { |
| 331 // Both ExtendedFilter and DelayCorrection are diabled by default. If any one | 331 extended_filter_enabled_ = config.Get<ExtendedFilter>().enabled; |
| 332 // of them is true, then the extended filter mode is enabled. | |
| 333 extended_filter_enabled_ = config.Get<ExtendedFilter>().enabled || | |
| 334 config.Get<DelayCorrection>().enabled; | |
| 335 reported_delay_enabled_ = config.Get<ReportedDelay>().enabled; | 332 reported_delay_enabled_ = config.Get<ReportedDelay>().enabled; |
| 336 Configure(); | 333 Configure(); |
| 337 } | 334 } |
| 338 | 335 |
| 339 void* EchoCancellationImpl::CreateHandle() const { | 336 void* EchoCancellationImpl::CreateHandle() const { |
| 340 return WebRtcAec_Create(); | 337 return WebRtcAec_Create(); |
| 341 } | 338 } |
| 342 | 339 |
| 343 void EchoCancellationImpl::DestroyHandle(void* handle) const { | 340 void EchoCancellationImpl::DestroyHandle(void* handle) const { |
| 344 assert(handle != NULL); | 341 assert(handle != NULL); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 374 int EchoCancellationImpl::num_handles_required() const { | 371 int EchoCancellationImpl::num_handles_required() const { |
| 375 return apm_->num_output_channels() * | 372 return apm_->num_output_channels() * |
| 376 apm_->num_reverse_channels(); | 373 apm_->num_reverse_channels(); |
| 377 } | 374 } |
| 378 | 375 |
| 379 int EchoCancellationImpl::GetHandleError(void* handle) const { | 376 int EchoCancellationImpl::GetHandleError(void* handle) const { |
| 380 assert(handle != NULL); | 377 assert(handle != NULL); |
| 381 return MapError(WebRtcAec_get_error_code(static_cast<Handle*>(handle))); | 378 return MapError(WebRtcAec_get_error_code(static_cast<Handle*>(handle))); |
| 382 } | 379 } |
| 383 } // namespace webrtc | 380 } // namespace webrtc |
| OLD | NEW |