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

Side by Side Diff: webrtc/modules/audio_processing/echo_control_mobile_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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // the public APM API. 272 // the public APM API.
273 Initialize(stream_properties_->sample_rate_hz, 273 Initialize(stream_properties_->sample_rate_hz,
274 stream_properties_->num_reverse_channels, 274 stream_properties_->num_reverse_channels,
275 stream_properties_->num_output_channels); 275 stream_properties_->num_output_channels);
276 } else { 276 } else {
277 enabled_ = enable; 277 enabled_ = enable;
278 } 278 }
279 return AudioProcessing::kNoError; 279 return AudioProcessing::kNoError;
280 } 280 }
281 281
282 bool EchoControlMobileImpl::is_enabled_render_side_query() const {
283 // TODO(peah): Add threadchecker.
284 rtc::CritScope cs_render(crit_render_);
285 return enabled_;
286 }
287
288 bool EchoControlMobileImpl::is_enabled() const { 282 bool EchoControlMobileImpl::is_enabled() const {
289 rtc::CritScope cs(crit_capture_); 283 rtc::CritScope cs(crit_capture_);
290 return enabled_; 284 return enabled_;
291 } 285 }
292 286
293 int EchoControlMobileImpl::set_routing_mode(RoutingMode mode) { 287 int EchoControlMobileImpl::set_routing_mode(RoutingMode mode) {
294 if (MapSetting(mode) == -1) { 288 if (MapSetting(mode) == -1) {
295 return AudioProcessing::kBadParameterError; 289 return AudioProcessing::kBadParameterError;
296 } 290 }
297 291
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 440 }
447 return error; 441 return error;
448 } 442 }
449 443
450 size_t EchoControlMobileImpl::num_handles_required() const { 444 size_t EchoControlMobileImpl::num_handles_required() const {
451 RTC_DCHECK(stream_properties_); 445 RTC_DCHECK(stream_properties_);
452 return stream_properties_->num_output_channels * 446 return stream_properties_->num_output_channels *
453 stream_properties_->num_reverse_channels; 447 stream_properties_->num_reverse_channels;
454 } 448 }
455 } // namespace webrtc 449 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/echo_control_mobile_impl.h ('k') | webrtc/modules/audio_processing/gain_control_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698