Auditioner seek calls are explicitly handled by the butler,
and DR:overwrite_existing_buffers() is called explicitly
to read MIDI data for audition.
Session::non_realtime_overwrite is no longer required.
This reverts commit 6fbcf83779
and parts of 2d11667ce3.
The options ForwardSlow, Forward and ForwardFast and their
respective Rewind options were not honoured in the execution
of forward/rewind operations when the transport was already
rolling at a slower speed than the forward or rewind option's
speed with same direction as the requested direction.
The Auditioner is not part of the session route-list and the
auditioner route's I/O latency is never updated.
Session::process_audition() does not handle pre-roll either,
so it need to be zeroed, otherwise Route::roll skips samples.
This has lead to initial samples being skipped, IFF the
auditioner's output-port had non-zero latency.
Since private port-latencies are usually only set for routes
in the route-list, and _remaining_latency_preroll is reset
at transport-stop, this *usually* worked...
Last but not least, MIDI notes need to be resolved when seeking.
IO::latency iterates over the port-set retrieving the
private_latency_range of each port. Since it can only change
when connections and latency changes, we can instead cache the value.
This is also in preparation to allow the auditioner to override it.
When the cursor position is after the last item in the vector,
upper_bound returns the last given iterator, here:
`region_boundary_cache.end()`, which is invalid to dereference.
Furthermore prevent possible duplicate prev/next pair at zero,
when using the video-timelime.
DiskReader::seek() no longer fills MIDI buffers.
MIDI is now read into memory via DR:overwrite_existing_buffers()
There is still some edge-case remaining to be fixed. For
some reasons the synth does not receive initial patch/program
changes when starting auditioning.
update_custom_midnam() is usually called from the GUI or butler
thread when a LV2 plugin is instantiated, or the plugin changes
its MIDNAM. It must be exclusive with load_midnams_in_thread()
and calls from MTAV to ::maybe_use().