| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  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   // Both ExtendedFilter and DelayCorrection are diabled by default. If any one | 
|  332   // of them is true, then the extended filter mode is enabled. |  332   // of them is true, then the extended filter mode is enabled. | 
|  333   extended_filter_enabled_ = config.Get<ExtendedFilter>().enabled || |  333   extended_filter_enabled_ = config.Get<ExtendedFilter>().enabled || | 
|  334                              config.Get<DelayCorrection>().enabled; |  334                              config.Get<DelayCorrection>().enabled; | 
|  335   reported_delay_enabled_ = config.Get<ReportedDelay>().enabled; |  335   reported_delay_enabled_ = config.Get<ReportedDelay>().enabled; | 
|  336   Configure(); |  336   Configure(); | 
|  337 } |  337 } | 
|  338  |  338  | 
|  339 void* EchoCancellationImpl::CreateHandle() const { |  339 void* EchoCancellationImpl::CreateHandle() const { | 
|  340   Handle* handle = NULL; |  340   return WebRtcAec_Create(); | 
|  341   if (WebRtcAec_Create(&handle) != apm_->kNoError) { |  | 
|  342     handle = NULL; |  | 
|  343   } else { |  | 
|  344     assert(handle != NULL); |  | 
|  345   } |  | 
|  346  |  | 
|  347   return handle; |  | 
|  348 } |  341 } | 
|  349  |  342  | 
|  350 void EchoCancellationImpl::DestroyHandle(void* handle) const { |  343 void EchoCancellationImpl::DestroyHandle(void* handle) const { | 
|  351   assert(handle != NULL); |  344   assert(handle != NULL); | 
|  352   WebRtcAec_Free(static_cast<Handle*>(handle)); |  345   WebRtcAec_Free(static_cast<Handle*>(handle)); | 
|  353 } |  346 } | 
|  354  |  347  | 
|  355 int EchoCancellationImpl::InitializeHandle(void* handle) const { |  348 int EchoCancellationImpl::InitializeHandle(void* handle) const { | 
|  356   assert(handle != NULL); |  349   assert(handle != NULL); | 
|  357   // TODO(ajm): Drift compensation is disabled in practice. If restored, it |  350   // TODO(ajm): Drift compensation is disabled in practice. If restored, it | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
|  381 int EchoCancellationImpl::num_handles_required() const { |  374 int EchoCancellationImpl::num_handles_required() const { | 
|  382   return apm_->num_output_channels() * |  375   return apm_->num_output_channels() * | 
|  383          apm_->num_reverse_channels(); |  376          apm_->num_reverse_channels(); | 
|  384 } |  377 } | 
|  385  |  378  | 
|  386 int EchoCancellationImpl::GetHandleError(void* handle) const { |  379 int EchoCancellationImpl::GetHandleError(void* handle) const { | 
|  387   assert(handle != NULL); |  380   assert(handle != NULL); | 
|  388   return MapError(WebRtcAec_get_error_code(static_cast<Handle*>(handle))); |  381   return MapError(WebRtcAec_get_error_code(static_cast<Handle*>(handle))); | 
|  389 } |  382 } | 
|  390 }  // namespace webrtc |  383 }  // namespace webrtc | 
| OLD | NEW |