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

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

Issue 2304123002: Cleaned up and revised the handling of resampling and bandsplitting in APM and (Closed)
Patch Set: Updated the test that required that no initialization should be done if APM is called with the defa… Created 4 years, 3 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 Initialize(stream_properties_->sample_rate_hz, 268 Initialize(stream_properties_->sample_rate_hz,
269 stream_properties_->num_reverse_channels, 269 stream_properties_->num_reverse_channels,
270 stream_properties_->num_output_channels, 270 stream_properties_->num_output_channels,
271 stream_properties_->num_proc_channels); 271 stream_properties_->num_proc_channels);
272 } else { 272 } else {
273 enabled_ = enable; 273 enabled_ = enable;
274 } 274 }
275 return AudioProcessing::kNoError; 275 return AudioProcessing::kNoError;
276 } 276 }
277 277
278 bool EchoCancellationImpl::is_enabled_render_side_query() const {
279 // TODO(peah): Add threadchecker.
280 rtc::CritScope cs_render(crit_render_);
281 return enabled_;
282 }
283
284 bool EchoCancellationImpl::is_enabled() const { 278 bool EchoCancellationImpl::is_enabled() const {
285 rtc::CritScope cs(crit_capture_); 279 rtc::CritScope cs(crit_capture_);
286 return enabled_; 280 return enabled_;
287 } 281 }
288 282
289 int EchoCancellationImpl::set_suppression_level(SuppressionLevel level) { 283 int EchoCancellationImpl::set_suppression_level(SuppressionLevel level) {
290 { 284 {
291 if (MapSetting(level) == -1) { 285 if (MapSetting(level) == -1) {
292 return AudioProcessing::kBadParameterError; 286 return AudioProcessing::kBadParameterError;
293 } 287 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 return error; 572 return error;
579 } 573 }
580 574
581 size_t EchoCancellationImpl::NumCancellersRequired() const { 575 size_t EchoCancellationImpl::NumCancellersRequired() const {
582 RTC_DCHECK(stream_properties_); 576 RTC_DCHECK(stream_properties_);
583 return stream_properties_->num_output_channels * 577 return stream_properties_->num_output_channels *
584 stream_properties_->num_reverse_channels; 578 stream_properties_->num_reverse_channels;
585 } 579 }
586 580
587 } // namespace webrtc 581 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/echo_cancellation_impl.h ('k') | webrtc/modules/audio_processing/echo_control_mobile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698