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}
diff --git a/modules/audio_coding/neteq/decision_logic.h b/modules/audio_coding/neteq/decision_logic.h
index 2030c4e..22fb9f7 100644
--- a/modules/audio_coding/neteq/decision_logic.h
+++ b/modules/audio_coding/neteq/decision_logic.h
@@ -68,11 +68,7 @@
// Resets the `cng_state_` to kCngOff.
void SetCngOff() override { cng_state_ = kCngOff; }
- // Reports back to DecisionLogic whether the decision to do expand remains or
- // not. Note that this is necessary, since an expand decision can be changed
- // to kNormal in NetEqImpl::GetDecision if there is still enough data in the
- // sync buffer.
- void ExpandDecision(NetEq::Operation operation) override;
+ void ExpandDecision(NetEq::Operation operation) override {}
// Adds `value` to `sample_memory_`.
void AddSampleMemory(int32_t value) override { sample_memory_ += value; }
@@ -85,7 +81,7 @@
void RegisterEmptyPacket() override {}
- void NotifyMutedState() override {}
+ void NotifyMutedState() override;
bool SetMaximumDelay(int delay_ms) override {
return delay_manager_->SetMaximumDelay(delay_ms);