Fix infinite loop issue with correctly formed, but useless iMelody files (bug 2068782).
It is possible to construct a legitimate iMelody file that consists of only control
commands such as ledon, ledoff, etc. in an infinite loop. If there are no notes or
rests in the file, the iMelody parser will spin in an infinite loop sucking as many
CPU cycles as it can get. This fix ignores loops that contain no notes or rests since
they make no sense. The controls will be processed, but the loop will only execute
once.
2 files changed