| 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 |
| 11 #include "webrtc/modules/audio_processing/echo_cancellation_impl.h" | 11 #include "webrtc/modules/audio_processing/echo_cancellation_impl.h" |
| 12 | 12 |
| 13 #include <assert.h> | 13 #include <assert.h> |
| 14 #include <string.h> | 14 #include <string.h> |
| 15 | 15 |
| 16 extern "C" { | 16 extern "C" { |
| 17 #include "webrtc/modules/audio_processing/aec/aec_core.h" | 17 #include "webrtc/modules/audio_processing/aec/aec_core.h" |
| 18 } | 18 } |
| 19 #include "webrtc/modules/audio_processing/aec/include/echo_cancellation.h" | 19 #include "webrtc/modules/audio_processing/aec/include/echo_cancellation.h" |
| 20 #include "webrtc/modules/audio_processing/audio_buffer.h" | 20 #include "webrtc/modules/audio_processing/audio_buffer.h" |
| 21 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" | 21 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
| 22 | 22 |
| 23 namespace webrtc { | 23 namespace webrtc { |
| 24 | 24 |
| 25 typedef void Handle; | 25 typedef void Handle; |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 int16_t MapSetting(EchoCancellation::SuppressionLevel level) { | 28 int16_t MapSetting(EchoCancellation::SuppressionLevel level) { |
| 29 switch (level) { | 29 switch (level) { |
| 30 case EchoCancellation::kLowSuppression: | 30 case EchoCancellation::kLowSuppression: |
| 31 return kAecNlpConservative; | 31 return kAecNlpConservative; |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 int EchoCancellationImpl::num_handles_required() const { | 380 int EchoCancellationImpl::num_handles_required() const { |
| 381 return apm_->num_output_channels() * | 381 return apm_->num_output_channels() * |
| 382 apm_->num_reverse_channels(); | 382 apm_->num_reverse_channels(); |
| 383 } | 383 } |
| 384 | 384 |
| 385 int EchoCancellationImpl::GetHandleError(void* handle) const { | 385 int EchoCancellationImpl::GetHandleError(void* handle) const { |
| 386 assert(handle != NULL); | 386 assert(handle != NULL); |
| 387 return MapError(WebRtcAec_get_error_code(static_cast<Handle*>(handle))); | 387 return MapError(WebRtcAec_get_error_code(static_cast<Handle*>(handle))); |
| 388 } | 388 } |
| 389 } // namespace webrtc | 389 } // namespace webrtc |
| OLD | NEW |