From 33aff896a089085f7c17d2ecdb00f5e55e447f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20=C3=81SHIN?= Date: Mon, 1 Jan 2018 14:19:01 +0100 Subject: [PATCH] Only generate stopnotes if delay actually happens --- miditones.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miditones.c b/miditones.c index 870fc88..c10d37f 100644 --- a/miditones.c +++ b/miditones.c @@ -1220,12 +1220,12 @@ This is not unlike multiway merging used for tape sorting algoritms in the 50's! delta_time = earliest_time - timenow; if (delta_time) { - gen_stopnotes(); /* first check if any tone generators have "stop note" commands pending */ /* Convert ticks to milliseconds based on the current tempo */ unsigned long long temp; temp = ((unsigned long long) delta_time * tempo) / ticks_per_beat; delta_msec = temp / 1000; // get around LCC compiler bug if (delta_msec) { + gen_stopnotes(); /* first check if any tone generators have "stop note" commands pending */ if (loggen) fprintf (logfile, "->Delay %ld msec (%ld ticks)\n", delta_msec, delta_time); if (delta_msec > 0x7fff)