A route may be processed before latency-compensation callback
sets the route's output_latency. In this case a random offset
was added to the start/end position (via latency_offset).
if a slot becomes active, and the transport is not rolling, it still
asks the transport to roll. however, (1) there's only 1 request across
all triggerboxen (2) the request will not be handled till the next
process cycle (3) the triggerbox returns after the request i.e. it
waits until the transport is rolling
This is otherwise only caught later in the rt-thread after
scheduling a RealTimeOperation via AutomationControl::check_rt.
There is no need to schedule cross-thread events when the
value is not about to be changed.
This can greatly reduce the number of signals emitted by
restoring a slot, which improves performance and also prevents
the EventPool from filling up with useless events.
It can happen that the EventQueue fills up with
SessionEvent::RealTimeOperation. Those are to scheduled to be
free()ed later the GUI thread via event_loop->call_slot().
However it can happen that the GUI EventPool is full, so the request
to call Session::rt_cleanup, is never executed.
In this case the SessionEvent pool can fill up with RealTime
Operations which remain there permanently.
It can happen that ::get_request() returns NULL if the
EventPool is full. In that case the slot is never called.
In this case the caller can now take action.
Plugins on Apple can be multi-arch (Intel + ARM), or AUs may
be bridged by Rosetta.
A user can also run Intel binary of Ardour or M1 binary on
M1 CPUs on macOS. Each can see different plugins - notably
VST3 plugins that are Intel only can be scanned using the
Intel binary, but are later not available with the M1 build.
There is no longer an extra set of rt-threads, but existing
process-graph threads are reused.
There are two main benefits to this approach: graph-threads
have a SessioEvent pool and ProcessThread buffers. They are
also joined to work-groups (on macOS), or JACK created threads
(cgroups).
The process-graph trigger_queue only needs to call
::prep() and ::run() without knowing any further details.
This is in preparation for using the graph-threads for rt-tasks
Route::silence() runs plugins. With a heavy session
that relies on multi-core processing, sending silence
to processors will have to be done in parallel.
Otherwise it can result in large DSP load and xruns.
This may allow to revert b3497b3f8f, which was
a prior attempt to resolve this, before understanding
the actual cause.
When auditioning, ardour's process_audition calls Route::silence
for all routes. PluginInsert::silence simply fed all [ports of all
[replicated] plugins with silence, regardless of port-mapping.
This can cause some VST2/3 plugins to change state, and enable ports
(e.g. stereo VST2 plugins on mono tracks), causing glitches.
This commit is mainly intended to investigate how significant
this glitch is when starting to audition.