Several reasons:
* This previously looked horribly inconsistent.
* The Gtk selector was broken for plugins with many presets,
making it impossible to select presets. For whatever reason,
the use of a menu fixes this bug.
* Towards a hierarchical menu for banked presets.
Previously the region was nearly invisible when editable which is
problematic ("oops, I made a new region"). The distinction isn't quite as
profound as it probably should be, but I don't want to mess with the other
region colours too much.
* allow to change buffersizes
* subscribe to buffersize & samplerate changes
* add support for half-duplex devices.
* aggregate Devices (not yet used) code from JACK2
* unify deprecated API wrappers
* properly keep track of MIDI ports
* disable MidiI/O during freewheeling
* various small fixes & cleanup
This avoids stuck notes if active notes are edited, but without stopping all
active notes in the region on any edit as before.
This implementation injects note ons in places that aren't actually note
starts. Depending on how percussive the instrument is, this may not be
desired. In the future, an option for this would be an improvement, but there
are other places where "start notes in the middle" is a reasonable option. I
think that should be handled universally if we're to do it at all, so not
considering it a part of this fix for now.
Towards putting more advanced logic here, where two copies of everything will
get even more hairy.
The two cases of reading from one or many regions are not very different in the
read phase, the only difference is the target. So, point a reference to the
appropriate target, use the same read code in either case, then sort/etc
afterwards only if necessary.
(hopefully) fixes export randomly stalling on windows:
dequeue_request() was a single request (no queue) on Windows.
Butler::queue_request() is called
-> Butler goes to work..
-> while working, another request is queued
-> butler never sees this
-> deadlock
during Freewheeling/Export wait_until_finished()
waits for the 2nd request to be handled, and never returns.