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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 | 1578 |
1579 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 1579 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
1580 // We just return if recording hasn't started. | 1580 // We just return if recording hasn't started. |
1581 debug_dump_.debug_file->CloseFile(); | 1581 debug_dump_.debug_file->CloseFile(); |
1582 return kNoError; | 1582 return kNoError; |
1583 #else | 1583 #else |
1584 return kUnsupportedFunctionError; | 1584 return kUnsupportedFunctionError; |
1585 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1585 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
1586 } | 1586 } |
1587 | 1587 |
| 1588 AudioProcessing::AudioProcessingStatistics::AudioProcessingStatistics() { |
| 1589 residual_echo_return_loss.Set(-100.0f, -100.0f, -100.0f, -100.0f); |
| 1590 echo_return_loss.Set(-100.0f, -100.0f, -100.0f, -100.0f); |
| 1591 echo_return_loss_enhancement.Set(-100.0f, -100.0f, -100.0f, -100.0f); |
| 1592 a_nlp.Set(-100.0f, -100.0f, -100.0f, -100.0f); |
| 1593 } |
| 1594 |
| 1595 AudioProcessing::AudioProcessingStatistics::AudioProcessingStatistics( |
| 1596 const AudioProcessingStatistics& other) = default; |
| 1597 |
| 1598 AudioProcessing::AudioProcessingStatistics::~AudioProcessingStatistics() = |
| 1599 default; |
| 1600 |
1588 // TODO(ivoc): Remove this when GetStatistics() becomes pure virtual. | 1601 // TODO(ivoc): Remove this when GetStatistics() becomes pure virtual. |
1589 AudioProcessing::AudioProcessingStatistics AudioProcessing::GetStatistics() | 1602 AudioProcessing::AudioProcessingStatistics AudioProcessing::GetStatistics() |
1590 const { | 1603 const { |
1591 return AudioProcessingStatistics(); | 1604 return AudioProcessingStatistics(); |
1592 } | 1605 } |
1593 | 1606 |
1594 AudioProcessing::AudioProcessingStatistics AudioProcessingImpl::GetStatistics() | 1607 AudioProcessing::AudioProcessingStatistics AudioProcessingImpl::GetStatistics() |
1595 const { | 1608 const { |
1596 AudioProcessingStatistics stats; | 1609 AudioProcessingStatistics stats; |
1597 EchoCancellation::Metrics metrics; | 1610 EchoCancellation::Metrics metrics; |
1598 int success = public_submodules_->echo_cancellation->GetMetrics(&metrics); | 1611 int success = public_submodules_->echo_cancellation->GetMetrics(&metrics); |
1599 if (success == Error::kNoError) { | 1612 if (success == Error::kNoError) { |
1600 stats.a_nlp.Set(metrics.a_nlp); | 1613 stats.a_nlp.Set(metrics.a_nlp); |
1601 stats.divergent_filter_fraction = metrics.divergent_filter_fraction; | 1614 stats.divergent_filter_fraction = metrics.divergent_filter_fraction; |
1602 stats.echo_return_loss.Set(metrics.echo_return_loss); | 1615 stats.echo_return_loss.Set(metrics.echo_return_loss); |
1603 stats.echo_return_loss_enhancement.Set( | 1616 stats.echo_return_loss_enhancement.Set( |
1604 metrics.echo_return_loss_enhancement); | 1617 metrics.echo_return_loss_enhancement); |
1605 stats.residual_echo_return_loss.Set(metrics.residual_echo_return_loss); | 1618 stats.residual_echo_return_loss.Set(metrics.residual_echo_return_loss); |
1606 } | 1619 } |
1607 stats.residual_echo_likelihood = | 1620 stats.residual_echo_likelihood = |
1608 private_submodules_->residual_echo_detector->echo_likelihood(); | 1621 private_submodules_->residual_echo_detector->echo_likelihood(); |
| 1622 stats.residual_echo_likelihood_recent_max = |
| 1623 private_submodules_->residual_echo_detector->echo_likelihood_recent_max(); |
1609 public_submodules_->echo_cancellation->GetDelayMetrics( | 1624 public_submodules_->echo_cancellation->GetDelayMetrics( |
1610 &stats.delay_median, &stats.delay_standard_deviation, | 1625 &stats.delay_median, &stats.delay_standard_deviation, |
1611 &stats.fraction_poor_delays); | 1626 &stats.fraction_poor_delays); |
1612 return stats; | 1627 return stats; |
1613 } | 1628 } |
1614 | 1629 |
1615 EchoCancellation* AudioProcessingImpl::echo_cancellation() const { | 1630 EchoCancellation* AudioProcessingImpl::echo_cancellation() const { |
1616 return public_submodules_->echo_cancellation.get(); | 1631 return public_submodules_->echo_cancellation.get(); |
1617 } | 1632 } |
1618 | 1633 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1971 capture_processing_format(kSampleRate16kHz), | 1986 capture_processing_format(kSampleRate16kHz), |
1972 split_rate(kSampleRate16kHz) {} | 1987 split_rate(kSampleRate16kHz) {} |
1973 | 1988 |
1974 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 1989 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; |
1975 | 1990 |
1976 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 1991 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; |
1977 | 1992 |
1978 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 1993 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; |
1979 | 1994 |
1980 } // namespace webrtc | 1995 } // namespace webrtc |
OLD | NEW |