Grid controllers will largely want to access clips in the order they appear on the Cue page
It is up to the device (and/or its ControlProtocol) to handle banking
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
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).
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.
This allows to pass any GraphChain to the Graph to process.
It removes the need to use a mutex to swap two dedicated
chains (setup-chain <> active-chain, pending-chain).
Also various special cases pertaining to graph interaction
while auditioning and route-deletion can be removed.
This also unconditionally creates a graph-thread for GraphChains
to be processed, even if the main callback uses a special-cased
sorted RouteList if there is only one process thread.
In order to detect if route delaylines need to be updated,
aux-send delaylines need to be updated first. This was previously
done directly in the latency-callback, which may be concurrent
with processing.
Now only the information (pending_delay) is set, and the actual
change happens later at the end of process().
Calls DR::set_pending_overwrite() sets DR::run_must_resolve
before the first run.
Previously this variable was set after the first ::run,
which resulted in notes at the beginning of audition to be
cut short.
Somewhat alarmed that gcc (at least) allows if (cue_recording ...) to be
used just like if (_cue_recording) even though the former is a class method
and the latter is a class member.
This fixes an issue with adding/removing tracks while auditioning.
Session::remove_routes() calls Graph::clear_other_chain(),
which will block until the graph chains have been swapped.
* PRO: you can audition synths at the varispeed tuning; you can use x42 guitar tuner when stopped
* CON: this is NOT like a tape machine ... a tape machine has no 'speed' when stopped
ToDo: if we find that this is contentious, we could make a config var for it
* remove unused variables in session.h
* move default play speed (varispeed(sic)) into fsm
* request_transport_speed should -never- set the default_play_speed
* PRO: you can audition synths at the varispeed tuning; you can use x42 guitar tuner when stopped
* CON: this is NOT like a tape machine ... a tape machine has no 'speed' when stopped
ToDo: if we find that this is contentious, we could make a config var for it
* remove unused variables in session.h
* move default play speed (varispeed(sic)) into fsm
* request_transport_speed should -never- set the default_play_speed
The TransportFSM is now responsible for deciding what to do at all transport state transitions. The Session (via the TransportAPI) merely
provides mechanism (locate, start, stop, set_speed). Default and most recent speed requests are managed by the TransportFSM too
"While 'atomic' has a volatile qualifier, this is a historical
artifact and the pointer passed to it should not be volatile."
Furthermore "It is very important that all accesses to a
particular integer or pointer be performed using only this API"
(from https://developer.gnome.org/glib/2.68/glib-Atomic-Operations.html)
Hence initialization of atomic variables is changed to also use
this API, instead of directly initializing the value.
This also fixes a few cases where atomic variables were
accessed directly.
see also libs/pbd/pbd/g_atomic_compat.h