Count consecutive expands by last mode in NetEq decision logic.

This is a slight change in behavior that fixes a bug where all expansions are not counted due to more than 10ms available in the sync buffer, which can happen after repeated expansions.

The counter should also be updated when in muted mode.

Bug: webrtc:13322
Change-Id: I067689ee251d3d1ae990a27cdd271f718b0d6f2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257360
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36483}
This commit is contained in:
Jakob Ivarsson
2022-04-04 21:42:55 +02:00
committed by WebRTC LUCI CQ
parent 64cdcc0792
commit ca101e6bb4
5 changed files with 28 additions and 36 deletions

View File

@ -1367,13 +1367,6 @@ TEST_F(NetEqImplTest, DecodingError) {
// We are not expecting anything for output.speech_type_, since an error was
// returned.
// Pull audio again, should continue an expansion.
EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output, &muted));
EXPECT_EQ(kMaxOutputSize, output.samples_per_channel_);
EXPECT_EQ(1u, output.num_channels_);
EXPECT_EQ(AudioFrame::kPLC, output.speech_type_);
EXPECT_THAT(output.packet_infos_, IsEmpty());
// Pull audio again, should behave normal.
EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output, &muted));
EXPECT_EQ(kMaxOutputSize, output.samples_per_channel_);