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; |