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

Unified Diff: webrtc/modules/audio_coding/neteq/decision_logic_normal.h

Issue 1945863002: NetEq: Replace timescale_holdoff_ with a Countdown timer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
Index: webrtc/modules/audio_coding/neteq/decision_logic_normal.h
diff --git a/webrtc/modules/audio_coding/neteq/decision_logic_normal.h b/webrtc/modules/audio_coding/neteq/decision_logic_normal.h
index 57aa13bf8ba01c5613a3e4aecf6c23d803eb2cae..aa0edf3152a21aeed7167d97d62390991d73ec58 100644
--- a/webrtc/modules/audio_coding/neteq/decision_logic_normal.h
+++ b/webrtc/modules/audio_coding/neteq/decision_logic_normal.h
@@ -28,11 +28,16 @@ class DecisionLogicNormal : public DecisionLogic {
DecoderDatabase* decoder_database,
const PacketBuffer& packet_buffer,
DelayManager* delay_manager,
- BufferLevelFilter* buffer_level_filter)
- : DecisionLogic(fs_hz, output_size_samples, playout_mode,
- decoder_database, packet_buffer, delay_manager,
- buffer_level_filter) {
- }
+ BufferLevelFilter* buffer_level_filter,
+ const TickTimer* tick_timer)
+ : DecisionLogic(fs_hz,
+ output_size_samples,
+ playout_mode,
+ decoder_database,
+ packet_buffer,
+ delay_manager,
+ buffer_level_filter,
+ tick_timer) {}
protected:
static const int kAllowMergeWithoutExpandMs = 20; // 20 ms.
@@ -86,7 +91,9 @@ class DecisionLogicNormal : public DecisionLogic {
// Checks if enough time has elapsed since the last successful timescale
// operation was done (i.e., accelerate or preemptive expand).
- bool TimescaleAllowed() const { return timescale_hold_off_ == 0; }
+ bool TimescaleAllowed() const {
+ return !timescale_countdown_ || timescale_countdown_->Finished();
+ }
// Checks if the current (filtered) buffer level is under the target level.
bool UnderTargetLevel() const;

Powered by Google App Engine
This is Rietveld 408576698