| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 58 } | 58 } | 
| 59 }  // namespace | 59 }  // namespace | 
| 60 | 60 | 
| 61 const size_t EchoControlMobileImpl::kAllowedValuesOfSamplesPerFrame1; | 61 const size_t EchoControlMobileImpl::kAllowedValuesOfSamplesPerFrame1; | 
| 62 const size_t EchoControlMobileImpl::kAllowedValuesOfSamplesPerFrame2; | 62 const size_t EchoControlMobileImpl::kAllowedValuesOfSamplesPerFrame2; | 
| 63 | 63 | 
| 64 size_t EchoControlMobile::echo_path_size_bytes() { | 64 size_t EchoControlMobile::echo_path_size_bytes() { | 
| 65     return WebRtcAecm_echo_path_size_bytes(); | 65     return WebRtcAecm_echo_path_size_bytes(); | 
| 66 } | 66 } | 
| 67 | 67 | 
| 68 EchoControlMobileImpl::EchoControlMobileImpl(const AudioProcessing* apm, | 68 EchoControlMobileImpl::EchoControlMobileImpl( | 
| 69                                              CriticalSectionWrapper* crit) | 69     const AudioProcessing* apm, | 
|  | 70     CriticalSectionWrapper* crit, | 
|  | 71     rtc::ThreadChecker* render_thread_checker) | 
| 70     : ProcessingComponent(), | 72     : ProcessingComponent(), | 
| 71       apm_(apm), | 73       apm_(apm), | 
| 72       crit_(crit), | 74       crit_(crit), | 
|  | 75       render_thread_checker_(render_thread_checker), | 
| 73       routing_mode_(kSpeakerphone), | 76       routing_mode_(kSpeakerphone), | 
| 74       comfort_noise_enabled_(true), | 77       comfort_noise_enabled_(true), | 
| 75       external_echo_path_(NULL), | 78       external_echo_path_(NULL), | 
| 76       render_queue_element_max_size_(0) { | 79       render_queue_element_max_size_(0) { | 
| 77   AllocateRenderQueue(); | 80   AllocateRenderQueue(); | 
| 78 } | 81 } | 
| 79 | 82 | 
| 80 EchoControlMobileImpl::~EchoControlMobileImpl() { | 83 EchoControlMobileImpl::~EchoControlMobileImpl() { | 
| 81     if (external_echo_path_ != NULL) { | 84     if (external_echo_path_ != NULL) { | 
| 82       delete [] external_echo_path_; | 85       delete [] external_echo_path_; | 
| 83       external_echo_path_ = NULL; | 86       external_echo_path_ = NULL; | 
| 84     } | 87     } | 
| 85 } | 88 } | 
| 86 | 89 | 
| 87 int EchoControlMobileImpl::ProcessRenderAudio(const AudioBuffer* audio) { | 90 int EchoControlMobileImpl::ProcessRenderAudio(const AudioBuffer* audio) { | 
|  | 91   RTC_DCHECK(render_thread_checker_->CalledOnValidThread()); | 
| 88   if (!is_component_enabled()) { | 92   if (!is_component_enabled()) { | 
| 89     return apm_->kNoError; | 93     return apm_->kNoError; | 
| 90   } | 94   } | 
| 91 | 95 | 
| 92   assert(audio->num_frames_per_band() <= 160); | 96   assert(audio->num_frames_per_band() <= 160); | 
| 93   assert(audio->num_channels() == apm_->num_reverse_channels()); | 97   assert(audio->num_channels() == apm_->num_reverse_channels()); | 
| 94 | 98 | 
| 95   int err = apm_->kNoError; | 99   int err = apm_->kNoError; | 
| 96 | 100 | 
| 97   // The ordering convention must be followed to pass to the correct AECM. | 101   // The ordering convention must be followed to pass to the correct AECM. | 
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 360   return apm_->num_output_channels() * | 364   return apm_->num_output_channels() * | 
| 361          apm_->num_reverse_channels(); | 365          apm_->num_reverse_channels(); | 
| 362 } | 366 } | 
| 363 | 367 | 
| 364 int EchoControlMobileImpl::GetHandleError(void* handle) const { | 368 int EchoControlMobileImpl::GetHandleError(void* handle) const { | 
| 365   assert(handle != NULL); | 369   assert(handle != NULL); | 
| 366   return AudioProcessing::kUnspecifiedError; | 370   return AudioProcessing::kUnspecifiedError; | 
| 367 } | 371 } | 
| 368 | 372 | 
| 369 }  // namespace webrtc | 373 }  // namespace webrtc | 
| OLD | NEW | 
|---|