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 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 // TODO(ivoc): Remove this when GetStatistics() becomes pure virtual. | 1480 // TODO(ivoc): Remove this when GetStatistics() becomes pure virtual. |
1481 AudioProcessing::AudioProcessingStatistics AudioProcessing::GetStatistics() | 1481 AudioProcessing::AudioProcessingStatistics AudioProcessing::GetStatistics() |
1482 const { | 1482 const { |
1483 return AudioProcessingStatistics(); | 1483 return AudioProcessingStatistics(); |
1484 } | 1484 } |
1485 | 1485 |
1486 AudioProcessing::AudioProcessingStatistics AudioProcessingImpl::GetStatistics() | 1486 AudioProcessing::AudioProcessingStatistics AudioProcessingImpl::GetStatistics() |
1487 const { | 1487 const { |
1488 AudioProcessingStatistics stats; | 1488 AudioProcessingStatistics stats; |
1489 EchoCancellation::Metrics metrics; | 1489 EchoCancellation::Metrics metrics; |
1490 public_submodules_->echo_cancellation->GetMetrics(&metrics); | 1490 int success = public_submodules_->echo_cancellation->GetMetrics(&metrics); |
1491 stats.a_nlp.Set(metrics.a_nlp); | 1491 if (success == Error::kNoError) { |
1492 stats.divergent_filter_fraction = metrics.divergent_filter_fraction; | 1492 stats.a_nlp.Set(metrics.a_nlp); |
1493 stats.echo_return_loss.Set(metrics.echo_return_loss); | 1493 stats.divergent_filter_fraction = metrics.divergent_filter_fraction; |
1494 stats.echo_return_loss_enhancement.Set(metrics.echo_return_loss_enhancement); | 1494 stats.echo_return_loss.Set(metrics.echo_return_loss); |
1495 stats.residual_echo_return_loss.Set(metrics.residual_echo_return_loss); | 1495 stats.echo_return_loss_enhancement.Set( |
| 1496 metrics.echo_return_loss_enhancement); |
| 1497 stats.residual_echo_return_loss.Set(metrics.residual_echo_return_loss); |
| 1498 } |
1496 public_submodules_->echo_cancellation->GetDelayMetrics( | 1499 public_submodules_->echo_cancellation->GetDelayMetrics( |
1497 &stats.delay_median, &stats.delay_standard_deviation, | 1500 &stats.delay_median, &stats.delay_standard_deviation, |
1498 &stats.fraction_poor_delays); | 1501 &stats.fraction_poor_delays); |
1499 return stats; | 1502 return stats; |
1500 } | 1503 } |
1501 | 1504 |
1502 EchoCancellation* AudioProcessingImpl::echo_cancellation() const { | 1505 EchoCancellation* AudioProcessingImpl::echo_cancellation() const { |
1503 return public_submodules_->echo_cancellation.get(); | 1506 return public_submodules_->echo_cancellation.get(); |
1504 } | 1507 } |
1505 | 1508 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 capture_processing_format(kSampleRate16kHz), | 1823 capture_processing_format(kSampleRate16kHz), |
1821 split_rate(kSampleRate16kHz) {} | 1824 split_rate(kSampleRate16kHz) {} |
1822 | 1825 |
1823 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 1826 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; |
1824 | 1827 |
1825 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 1828 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; |
1826 | 1829 |
1827 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 1830 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; |
1828 | 1831 |
1829 } // namespace webrtc | 1832 } // namespace webrtc |
OLD | NEW |