NetEq: Replace timescale_holdoff_ with a Countdown timer
The timescale_holdoff_ is a counter in the DecisionLogic class. The
purpose is to enforce a minimum number of GetAudio calls
between (successfull) time-scaling operations (i.e., Accelerate and
Pre-emptive Expand operations). With this change, the counter is
replaced with a Countdown timer obtained from a TickTimer object.
BUG=webrtc:5608
R=tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1945863002 .
Cr-Commit-Position: refs/heads/master@{#12670}
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.cc b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
index 6d705e1..555d3c7 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
@@ -2147,11 +2147,9 @@
}
void NetEqImpl::CreateDecisionLogic() {
- decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_,
- playout_mode_,
- decoder_database_.get(),
- *packet_buffer_.get(),
- delay_manager_.get(),
- buffer_level_filter_.get()));
+ decision_logic_.reset(DecisionLogic::Create(
+ fs_hz_, output_size_samples_, playout_mode_, decoder_database_.get(),
+ *packet_buffer_.get(), delay_manager_.get(), buffer_level_filter_.get(),
+ tick_timer_.get()));
}
} // namespace webrtc