Static visibility probably useless given how we're invoking the
compilers (except maybe tcc.) But the 'noinline' attribute speeds up
compilation slightly for gcc, and significantly for clang. No useful
difference in the generated code -- most of this is cold stuff in the
UI. (gcc generated binary might get slightly larger depending on lto
choices now, but only by a few hundred bytes, probably.)
Save a level of nesting and mental bookkeeping. The control flow was
already jumping within and outside of the loop, so we aren't making this
any more complicated than it already was -- in fact, it's more simple,
because now we also don't have to remember that we're in a 'for' loop.
Was just too long and made navigation difficult. There's no actual
requirement for this procedure to be split out. But it lets us drop 2
levels of indentation and makes navigating up and down main() easier. On
the downside, it breaks up control flow.
Since we changed to use PortMidi's timestamping and buffering stuff,
(because otherwise MIDI timing gets messed up for some people for some
unknown reason), there's now a chance that MIDI notes can get stuck on
when quitting orca, because PortMidi seems to be dumb and won't
immediately send the pending events. So we have to manually spin and
wait for them to be sent. There doesn't appear to be a way to forcefully
flush them, so we're stuck adding an delay.