Chromium Code Reviews| Index: webrtc/modules/audio_processing/audio_processing_impl.cc |
| diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc |
| index 4c9188f7682df48404c8d70ce31e6ec2dc944ad0..1f73c5984a68af29d7dd941a64f88a834fd9e72a 100644 |
| --- a/webrtc/modules/audio_processing/audio_processing_impl.cc |
| +++ b/webrtc/modules/audio_processing/audio_processing_impl.cc |
| @@ -1616,10 +1616,14 @@ AudioProcessing::AudioProcessingStatistics AudioProcessingImpl::GetStatistics() |
| metrics.echo_return_loss_enhancement); |
| stats.residual_echo_return_loss.Set(metrics.residual_echo_return_loss); |
| } |
| - stats.residual_echo_likelihood = |
| - private_submodules_->residual_echo_detector->echo_likelihood(); |
| - stats.residual_echo_likelihood_recent_max = |
| - private_submodules_->residual_echo_detector->echo_likelihood_recent_max(); |
| + { |
| + rtc::CritScope cs_capture(&crit_capture_); |
| + stats.residual_echo_likelihood = |
| + private_submodules_->residual_echo_detector->echo_likelihood(); |
|
tommi
2017/03/15 16:14:45
could we instead make sure that either these stats
ivoc
2017/03/15 17:14:15
This function is called from a Chromium thread (I
tommi
2017/03/15 17:27:59
From what I can tell, it's actually called from ou
ivoc
2017/03/15 19:30:43
Yes, that's one place this is called from. Another
|
| + stats.residual_echo_likelihood_recent_max = |
| + private_submodules_->residual_echo_detector |
| + ->echo_likelihood_recent_max(); |
| + } |
| public_submodules_->echo_cancellation->GetDelayMetrics( |
| &stats.delay_median, &stats.delay_standard_deviation, |
| &stats.fraction_poor_delays); |