This commit leaves two issues outstanding:
1. unclear/ugly semantics for drag operations that reset the GUI thread's tempo map to the writable copy
2. undo/redo for the tempo map
These will be addressed in future commits
This allows two reader threads to proceed without blocking each other, as can
happen when the butler renders a MIDI track into an RT-safe buffer while the
GUI reads the same MidiModel/Source for visual display.
When loading a session, we now just set up port state, which will
populate the Port::_connections member, and then once all ports have
been created, use PortManager::reconnect_ports() to get everything connected.
"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
By default Apple uses a private TMP folder. While mktemp
returns "/tmp/xxx" the canonical path is "/private/tmp/xxx".
This lead to issues when tmp-prefix is removed when building
the session-archive.
See also e52bdc55ad
This is is useful to determine if an undoable action was
performed before adding additional information (e.g. selection
changes) to the undo transaction.
This is needed for threaded peak-file creation. The same
nested source may be accessed multiple times concurrently
(in addition to the butler thread reading it).
This fixes Bitrunner's "filum2020" session randomly showing garbage
waveforms.
Previously when loading old session Route::init() of the master-bus
was called without the "MasterOut" or "MonitorOut" flag being set.
Various conditions that relied on is_master() or is_monitor()
during initialization failed when loading those sessions, leading
to subtle breakage.
previously this subscription was handle done in
Route::add_routes() -> add_routes_inner() for MIDI tracks only.
Since f6c0b02d9f this was only done when adding
tracks, after any instruments were loaded (and fanned out).