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

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

Issue 1859243002: Added a query function for whether submodules are enabled (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: "Rebase with latest master" Created 4 years, 8 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
278 bool EchoCancellationImpl::is_enabled() const { 284 bool EchoCancellationImpl::is_enabled() const {
279 rtc::CritScope cs(crit_capture_); 285 rtc::CritScope cs(crit_capture_);
280 return enabled_; 286 return enabled_;
281 } 287 }
282 288
283 int EchoCancellationImpl::set_suppression_level(SuppressionLevel level) { 289 int EchoCancellationImpl::set_suppression_level(SuppressionLevel level) {
284 { 290 {
285 if (MapSetting(level) == -1) { 291 if (MapSetting(level) == -1) {
286 return AudioProcessing::kBadParameterError; 292 return AudioProcessing::kBadParameterError;
287 } 293 }
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 return error; 558 return error;
553 } 559 }
554 560
555 size_t EchoCancellationImpl::NumCancellersRequired() const { 561 size_t EchoCancellationImpl::NumCancellersRequired() const {
556 RTC_DCHECK(stream_properties_); 562 RTC_DCHECK(stream_properties_);
557 return stream_properties_->num_output_channels * 563 return stream_properties_->num_output_channels *
558 stream_properties_->num_reverse_channels; 564 stream_properties_->num_reverse_channels;
559 } 565 }
560 566
561 } // namespace webrtc 567 } // 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