From db7cd9742b271dad089b3fdffb099c05a599d0f5 Mon Sep 17 00:00:00 2001 From: Florrie Date: Sun, 8 Apr 2018 11:29:16 -0300 Subject: Improve duration accuracy in SoX player --- src/loop-play.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/loop-play.js b/src/loop-play.js index c838ea7..760e63a 100644 --- a/src/loop-play.js +++ b/src/loop-play.js @@ -218,7 +218,8 @@ class SoXPlayer extends Player { const duration = Math.round( (curHour + remHour) * 3600 + (curMin + remMin) * 60 + - (curSec + remSec) * 1 + (curSec + remSec) * 1 + + (curSecFrac + remSecFrac) / 100 ) const lenHour = Math.floor(duration / 3600) -- cgit 1.3.0-6-gf8a5