From a63a110054902d2cdcccd3ee751f111e869fef5d Mon Sep 17 00:00:00 2001 From: Chris Fuentes Date: Mon, 1 Aug 2022 23:30:09 +0100 Subject: [PATCH] Update run_length_encoding.py Use state.current_time after finishing decoding an event --- mt3/run_length_encoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mt3/run_length_encoding.py b/mt3/run_length_encoding.py index 0a88013..76d418c 100644 --- a/mt3/run_length_encoding.py +++ b/mt3/run_length_encoding.py @@ -305,7 +305,7 @@ def decode_events( continue if event.type == 'shift': cur_steps += event.value - cur_time = start_time + cur_steps / codec.steps_per_second + cur_time = state.current_time + cur_steps / codec.steps_per_second if max_time and cur_time > max_time: dropped_events = len(tokens) - token_idx break