|
|
@ -1220,12 +1220,12 @@ This is not unlike multiway merging used for tape sorting algoritms in the 50's! |
|
|
|
|
|
|
|
|
|
|
|
delta_time = earliest_time - timenow; |
|
|
|
delta_time = earliest_time - timenow; |
|
|
|
if (delta_time) { |
|
|
|
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 */ |
|
|
|
/* Convert ticks to milliseconds based on the current tempo */ |
|
|
|
unsigned long long temp; |
|
|
|
unsigned long long temp; |
|
|
|
temp = ((unsigned long long) delta_time * tempo) / ticks_per_beat; |
|
|
|
temp = ((unsigned long long) delta_time * tempo) / ticks_per_beat; |
|
|
|
delta_msec = temp / 1000; // get around LCC compiler bug
|
|
|
|
delta_msec = temp / 1000; // get around LCC compiler bug
|
|
|
|
if (delta_msec) { |
|
|
|
if (delta_msec) { |
|
|
|
|
|
|
|
gen_stopnotes(); /* first check if any tone generators have "stop note" commands pending */ |
|
|
|
if (loggen) |
|
|
|
if (loggen) |
|
|
|
fprintf (logfile, "->Delay %ld msec (%ld ticks)\n", delta_msec, delta_time); |
|
|
|
fprintf (logfile, "->Delay %ld msec (%ld ticks)\n", delta_msec, delta_time); |
|
|
|
if (delta_msec > 0x7fff) |
|
|
|
if (delta_msec > 0x7fff) |
|
|
|