Session::process_audition calls Graph::swap_process_chain()
to handle any pending graph changes (notably route removal
depends the graph to switch chains to drop references).
However this must not change the Graph::_trigger_queue
(which is refilled when processing resumes).
Previously routes were added to the trigger_queue, leading to
an inconsistent Graph state. When the terminal-count was reached
the trigger-queue was not empty. Process threads ran after processing
already completed and or concurrently with processing.
A common result of that was:
delayline.cc:70: virtual void ARDOUR::DelayLine::run(ARDOUR::BufferSet&, ARDOUR::samplepos_t, ARDOUR::samplepos_t, double, ARDOUR::pframes_t, bool): Assertion `lm.locked ()' failed.
This is required to be able to include
"audiographer/sndfile/sndfile_writer.h" in more than
one source file. which would otherwise lead to
duplicate symbol: AudioGrapher::SndfileHandle::..
In session file formats earlier than 7000, region position and length
are stored in distinct XML node properties. For 7000 or later, both
position and length are part of the "length" member. Fix reloading
this by noting session file format and loading position and length
more explicitly
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 causes issues if the header is included early on
in particular a conflict with gdkx.h
The reference to ‘Window’ is ambiguous `Gtk::Window` vs [X11]Window.
These are all defined via macros now. We send PropertyChange notifications when the value is set
even though it may not yet be in use.
This also changes the std::atomic used to protect the UIState<->Properties interlocking to
unsigned, to get defined behavior when the generation counter wraps
This doesn't yet correctly fix Pane::constrain_fract() constraints,
when moving the divider, but it does prevent child widgets from
being allocated with a size smaller than their minimum.
This fixes some layout and rendering issues (widgets that have
a too small allocation are not exposed and/or bleed into neighbors)
UIs only set a "shadow" value of most trigger properties, and use CAS to interlock (contention
is not expected to ever be an issue, it would imply two UIs being used to control this at
precisely the same time. The actual properties are updated whenever the trigger calls ::retrigger()
Compare to PluginInsert::set_state(). The sidechain must not
inherit the name from the template track. That leads
to port-name ambiguities.
Also later there will be a crash when ::update_sidechain_name()
calls IO::set_name since: _name is not found in _current_name.
This allows to use standard arithmetic (+ - * / %) and
relational (< <= ==) operations on Temporal::timepos_t
and Temporal::timecnt_t class instances.
Furthermore `print()` outputs the actual value (no longer
user-data pointer to the instance).
Logs for a file named ABCDEF.flac showed up as
2022-01-19T16:31:55 [ERROR]: SndFileSource: could not seek to sample 90059776 within BCDEF.flac (No Error.)
So, evidently, there is no need for the substr(1).
_name is a PBD::Property<string> which already uses .val() for <<.
The same pattern is found and fixed in sndfilesource.cc and
coreaudiosource.cc .
Do not run the sidechaing processor before the processor
was configured. This ensure that Route::configure_processors()
has completed and ensure_buffers() was called.
Otherwise it may happen Sidechain::run could request a buffer
that is n/a (BufferSet::get_available assertion, see also 687149d8d2)
Track::init() must not call `add_processor` directly.
The track is not in the process graph, yet and hence various
calls (e.g. lock graph, update latency etc) are not applicable.
Furthermore ::add_midi_sidechain() calls IO::add_port()
which takes the process-lock.
The solution is to create the Triggerbox early on and let Route::init
deal with it like any other internal processors.
This fixes an issue when adding a MIDI track, but there there
are no session-buffers for it, leading to:
ARDOUR::Buffer& ARDOUR::BufferSet::get_available(ARDOUR::DataType, size_t): Assertioni < _available.get(type)' failed.