From 98c7c46c792536fefa8cbff108f34b6df2b25b88 Mon Sep 17 00:00:00 2001 From: fengshang1972 Date: Fri, 7 Jul 2023 08:24:11 -0400 Subject: [PATCH] Update msxqual.c MSX.Qtime is in milli second and pattern time step is in second. Pattern item index was calculated wrong. It is fixed. --- Src/msxqual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/msxqual.c b/Src/msxqual.c index a07abce..42684e9 100644 --- a/Src/msxqual.c +++ b/Src/msxqual.c @@ -1209,7 +1209,7 @@ double getSourceQual(Psource source) // --- apply time pattern if assigned i = source->pat; if (i == 0) return(c); - k = (int)((MSX.Qtime + MSX.Pstart) / MSX.Pstep) % MSX.Pattern[i].length; + k = (int)((MSX.Qtime + MSX.Pstart*1000) / (MSX.Pstep*1000)) % MSX.Pattern[i].length; if (k != MSX.Pattern[i].interval) { if ( k < MSX.Pattern[i].interval )