Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(846)

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_unittest.cc

Issue 2965203002: Let NetEq reset the AudioFrame during muted state (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/neteq/neteq_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
index 5049a6b5a43d0a82c790bfbe810e8a2084505e89..54b7eb34e5cdf8a74ba56cc1dcfe45c44378724a 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc
@@ -1336,6 +1336,7 @@ TEST_F(NetEqDecodingTestWithMutedState, MutedState) {
EXPECT_FALSE(GetAudioReturnMuted());
// Pull data until faded out.
GetAudioUntilMuted();
+ EXPECT_TRUE(out_frame_.muted());
// Verify that output audio is not written during muted mode. Other parameters
// should be correct, though.
@@ -1347,6 +1348,7 @@ TEST_F(NetEqDecodingTestWithMutedState, MutedState) {
bool muted;
EXPECT_EQ(0, neteq_->GetAudio(&new_frame, &muted));
EXPECT_TRUE(muted);
+ EXPECT_TRUE(out_frame_.muted());
for (size_t i = 0; i < AudioFrame::kMaxDataSizeSamples; i++) {
EXPECT_EQ(17, frame_data[i]);
}
@@ -1362,6 +1364,7 @@ TEST_F(NetEqDecodingTestWithMutedState, MutedState) {
// packet. Verify that normal operation resumes.
InsertPacket(kSamples * counter_);
GetAudioUntilNormal();
+ EXPECT_FALSE(out_frame_.muted());
NetEqNetworkStatistics stats;
EXPECT_EQ(0, neteq_->NetworkStatistics(&stats));
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698