Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(521)

Side by Side Diff: webrtc/modules/audio_processing/echo_cancellation_impl.cc

Issue 1695743004: Removing the use of the soon-to-be-removed echo_cancellation_impl (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 if (err != AudioProcessing::kNoError || !is_component_enabled()) { 408 if (err != AudioProcessing::kNoError || !is_component_enabled()) {
409 return err; 409 return err;
410 } 410 }
411 } 411 }
412 412
413 AllocateRenderQueue(); 413 AllocateRenderQueue();
414 414
415 return AudioProcessing::kNoError; 415 return AudioProcessing::kNoError;
416 } 416 }
417 417
418 int EchoCancellationImpl::GetSystemDelayInSamples() const {
419 rtc::CritScope cs(crit_capture_);
420 // Report the delay for the first AEC component.
the sun 2016/02/17 11:39:03 RTC_DCHECK(is_component_enabled()) ?
peah-webrtc 2016/03/04 09:46:25 Done.
421 return WebRtcAec_system_delay(
422 WebRtcAec_aec_core(static_cast<Handle*>(handle(0))));
423 }
424
418 void EchoCancellationImpl::AllocateRenderQueue() { 425 void EchoCancellationImpl::AllocateRenderQueue() {
419 const size_t new_render_queue_element_max_size = std::max<size_t>( 426 const size_t new_render_queue_element_max_size = std::max<size_t>(
420 static_cast<size_t>(1), 427 static_cast<size_t>(1),
421 kMaxAllowedValuesOfSamplesPerFrame * num_handles_required()); 428 kMaxAllowedValuesOfSamplesPerFrame * num_handles_required());
422 429
423 rtc::CritScope cs_render(crit_render_); 430 rtc::CritScope cs_render(crit_render_);
424 rtc::CritScope cs_capture(crit_capture_); 431 rtc::CritScope cs_capture(crit_capture_);
425 432
426 // Reallocate the queue if the queue item size is too small to fit the 433 // Reallocate the queue if the queue item size is too small to fit the
427 // data to put in the queue. 434 // data to put in the queue.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 // Not locked as it only relies on APM public API which is threadsafe. 500 // Not locked as it only relies on APM public API which is threadsafe.
494 return apm_->num_output_channels() * apm_->num_reverse_channels(); 501 return apm_->num_output_channels() * apm_->num_reverse_channels();
495 } 502 }
496 503
497 int EchoCancellationImpl::GetHandleError(void* handle) const { 504 int EchoCancellationImpl::GetHandleError(void* handle) const {
498 // Not locked as it does not rely on anything in the state. 505 // Not locked as it does not rely on anything in the state.
499 assert(handle != NULL); 506 assert(handle != NULL);
500 return AudioProcessing::kUnspecifiedError; 507 return AudioProcessing::kUnspecifiedError;
501 } 508 }
502 } // namespace webrtc 509 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698