* 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.
MidiPort::cycle_end() was never called, hence after the
first cycle all midi buffers were assumed to be
“mixed down” already.
this fixes
Midi-track 1 -[midi]-> Midi-track2 synth -[audio]-> out
on export.