NetEq: Fix stats counting in muted mode

The NetEqNetworkStatistics::expand_rate was not incremented during muted
state, which caused under-reporting of that metric. This change fixes
that.

BUG=chromium:613321, webrtc:5608

Review-Url: https://codereview.webrtc.org/2003203004
Cr-Commit-Position: refs/heads/master@{#12894}
This commit is contained in:
henrik.lundin
2016-05-25 08:21:04 -07:00
committed by Commit bot
parent e352578bc8
commit 612c25e7af
2 changed files with 10 additions and 0 deletions

View File

@ -1609,6 +1609,15 @@ TEST_F(NetEqDecodingTestWithMutedState, MutedState) {
// packet. Verify that normal operation resumes.
InsertPacket(kSamples * counter_);
GetAudioUntilNormal();
NetEqNetworkStatistics stats;
EXPECT_EQ(0, neteq_->NetworkStatistics(&stats));
// NetEqNetworkStatistics::expand_rate tells the fraction of samples that were
// concealment samples, in Q14 (16384 = 100%) .The vast majority should be
// concealment samples in this test.
EXPECT_GT(stats.expand_rate, 14000);
// And, it should be greater than the speech_expand_rate.
EXPECT_GT(stats.expand_rate, stats.speech_expand_rate);
}
// Verifies that NetEq goes out of muted state when given a delayed packet.