Use the new AudioProcessing statistics everywhere.
The new interface uses optionals instead of default values, and only values that are actually used are included. To make it easy to add/remove stats in the future, the struct itself is copied around on all layers, instead of copying the values one by one. This CL also fixes a bug which caused several APM statistics to get stuck at a fixed level when there are no more receive streams (after some period where there were receive streams). Since APM doesn't know this happens, an argument was added to the GetStats call to pass this information down to APM. Bug: webrtc:8563, b/67926135 Change-Id: I96cc008353355bb520c4523f5c5379860f73ee24 Reviewed-on: https://webrtc-review.googlesource.com/25621 Commit-Queue: Ivo Creusen <ivoc@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20877}
This commit is contained in:
@ -3026,7 +3026,7 @@ TEST(MAYBE_ApmStatistics, AEC2EnabledTest) {
|
||||
}
|
||||
|
||||
// Test statistics interface.
|
||||
AudioProcessing::AudioProcessingStats stats = apm->GetStatistics(true);
|
||||
AudioProcessingStats stats = apm->GetStatistics(true);
|
||||
// We expect all statistics to be set and have a sensible value.
|
||||
ASSERT_TRUE(stats.residual_echo_likelihood);
|
||||
EXPECT_GE(*stats.residual_echo_likelihood, 0.0);
|
||||
@ -3085,7 +3085,7 @@ TEST(MAYBE_ApmStatistics, AECMEnabledTest) {
|
||||
}
|
||||
|
||||
// Test statistics interface.
|
||||
AudioProcessing::AudioProcessingStats stats = apm->GetStatistics(true);
|
||||
AudioProcessingStats stats = apm->GetStatistics(true);
|
||||
// We expect only the residual echo detector statistics to be set and have a
|
||||
// sensible value.
|
||||
EXPECT_TRUE(stats.residual_echo_likelihood);
|
||||
|
||||
Reference in New Issue
Block a user