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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 int EchoCancellationImpl::enable_metrics(bool enable) { | 263 int EchoCancellationImpl::enable_metrics(bool enable) { |
264 { | 264 { |
265 rtc::CritScope cs(crit_capture_); | 265 rtc::CritScope cs(crit_capture_); |
266 metrics_enabled_ = enable; | 266 metrics_enabled_ = enable; |
267 } | 267 } |
268 return Configure(); | 268 return Configure(); |
269 } | 269 } |
270 | 270 |
271 bool EchoCancellationImpl::are_metrics_enabled() const { | 271 bool EchoCancellationImpl::are_metrics_enabled() const { |
272 rtc::CritScope cs(crit_capture_); | 272 rtc::CritScope cs(crit_capture_); |
273 return metrics_enabled_; | 273 return enabled_ && metrics_enabled_; |
274 } | 274 } |
275 | 275 |
276 // TODO(ajm): we currently just use the metrics from the first AEC. Think more | 276 // TODO(ajm): we currently just use the metrics from the first AEC. Think more |
277 // aboue the best way to extend this to multi-channel. | 277 // aboue the best way to extend this to multi-channel. |
278 int EchoCancellationImpl::GetMetrics(Metrics* metrics) { | 278 int EchoCancellationImpl::GetMetrics(Metrics* metrics) { |
279 rtc::CritScope cs(crit_capture_); | 279 rtc::CritScope cs(crit_capture_); |
280 if (metrics == NULL) { | 280 if (metrics == NULL) { |
281 return AudioProcessing::kNullPointerError; | 281 return AudioProcessing::kNullPointerError; |
282 } | 282 } |
283 | 283 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 int EchoCancellationImpl::enable_delay_logging(bool enable) { | 326 int EchoCancellationImpl::enable_delay_logging(bool enable) { |
327 { | 327 { |
328 rtc::CritScope cs(crit_capture_); | 328 rtc::CritScope cs(crit_capture_); |
329 delay_logging_enabled_ = enable; | 329 delay_logging_enabled_ = enable; |
330 } | 330 } |
331 return Configure(); | 331 return Configure(); |
332 } | 332 } |
333 | 333 |
334 bool EchoCancellationImpl::is_delay_logging_enabled() const { | 334 bool EchoCancellationImpl::is_delay_logging_enabled() const { |
335 rtc::CritScope cs(crit_capture_); | 335 rtc::CritScope cs(crit_capture_); |
336 return delay_logging_enabled_; | 336 return enabled_ && delay_logging_enabled_; |
337 } | 337 } |
338 | 338 |
339 bool EchoCancellationImpl::is_delay_agnostic_enabled() const { | 339 bool EchoCancellationImpl::is_delay_agnostic_enabled() const { |
340 rtc::CritScope cs(crit_capture_); | 340 rtc::CritScope cs(crit_capture_); |
341 return delay_agnostic_enabled_; | 341 return delay_agnostic_enabled_; |
342 } | 342 } |
343 | 343 |
344 bool EchoCancellationImpl::is_aec3_enabled() const { | 344 bool EchoCancellationImpl::is_aec3_enabled() const { |
345 rtc::CritScope cs(crit_capture_); | 345 rtc::CritScope cs(crit_capture_); |
346 return aec3_enabled_; | 346 return aec3_enabled_; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 return error; | 506 return error; |
507 } | 507 } |
508 | 508 |
509 size_t EchoCancellationImpl::NumCancellersRequired( | 509 size_t EchoCancellationImpl::NumCancellersRequired( |
510 size_t num_output_channels, | 510 size_t num_output_channels, |
511 size_t num_reverse_channels) { | 511 size_t num_reverse_channels) { |
512 return num_output_channels * num_reverse_channels; | 512 return num_output_channels * num_reverse_channels; |
513 } | 513 } |
514 | 514 |
515 } // namespace webrtc | 515 } // namespace webrtc |
OLD | NEW |