Do not include zero-length delays in output

This would cause lockup in ATtiny-playtune and output can be significantly
shorter without zero-length delays.

See http://www.mariopiano.com/Mario-Sheet-Music-Overworld-Main-Theme.mid
pull/11/head
László ÁSHIN 7 years ago
parent 5e7791bc68
commit 18656188be
No known key found for this signature in database
GPG Key ID: 35BA1675CD4AAD15
  1. 2
      miditones.c

@ -1225,6 +1225,7 @@ This is not unlike multiway merging used for tape sorting algoritms in the 50's!
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) {
if (loggen)
fprintf (logfile, "->Delay %ld msec (%ld ticks)\n", delta_msec, delta_time);
if (delta_msec > 0x7fff)
@ -1239,6 +1240,7 @@ This is not unlike multiway merging used for tape sorting algoritms in the 50's!
outfile_items (2);
}
}
}
timenow = earliest_time;
/* If this track event is "set tempo", just change the global tempo.

Loading…
Cancel
Save