Ardour prevents repeat crashes by first marking a plugin
as blacklisted, and after a successful scan the plugin is
whitelisted.
When not scanning for plugins, but reading the cache
and successfully parsing the cashed content, a VST2 plugin
is whitelisted, even though it may not have been blacklisted.
In case the blacklist is empty, this lead to a logging:
"Expected VST Blacklist file does not exist."
PS. This also consolidates VST2 + VST3 code for white/blacklist
::length() was non-virtual, and so calling SrcFileSource::length() would access
the base class (AudioFileSource)'s version. Since SrcFileSource is essentially
a pimpl-like pattern, this was incorrect; we need to make sure we call the
pimpl-style method instead.
Audio ports are sorted using PBD::naturally_less.
PBD::naturally_less is also used as compare function
for port-lists, port-sets, and port-maps.
So in sets and maps, the function is used to test
for uniqueness. This lead to issues since naturally_less
treats whitespace and underscores as identical.
While it was possible to have routes named "Audio_1",
and "Audio 1", this resulted in missing ports for one
of the routes.
see also 60ff3ef764
This is mainly motivated by DPF's new VST3 implementation, but
also takes a leaf out of JUCE's book, unconditionally initializing
the VST::IEditController even if it is-a VST::IComponent.
and likewise calling terminate().
If time domains differ, it is necessary to first convert the argument duration into a duration
at the position of "this", in the correct time domain. Then we recursively call the operator
again, but this time we will use the fast path that just adds two timepos_t values.
This fixes async callback from CoreAudio via
AudioDeviceAddPropertyListener. Apparently in rare cases it can
happen that the property listener calls back concurrently with
processing on M1 machines using Rosetta.
https://pastebin.com/upvc9LTc Thread 44 vs. Thread 32
May also be caused by plugin(s) taking a long time to
change buffersize. Processing continues even though the
buffersize callback has not yet completed.
PS. I have not been able to reproduce this on an Intel
machine, even with excessive buffersize changes. However
since buffersize changes cannot (usually) happen concurrently
with processing, taking the lock is reasonable.
Some plugins have a min/max range of 1, for stepwise enumerated
values of a control. e.g. waves maps note-names this way.
https://discourse.ardour.org/t/106429/
pbd/i18n.h MUST NEVER be included from header files and always be
the last include. This is because `_` is declared other headers
notably boost and some apple headers.
leading to issues like
../libs/pbd/gettext.h:58:27: error: expected unqualified-id before ‘const’
58 | # define gettext(Msgid) ((const char *) (Msgid))
Makes it slightly easier to read+parse what is happening. Yes, for a
Sequence property, the call could apply several changes, but overwhelmingly
it is used to apply a single change.
After the editor is attached as tab to the main window,
looking up keyboard bindings using get_toplevel() no longer
works.
This uses the widget-hierarchy just like ARDOUR_UI does.
It turned out that 'boost::intrusive::list_base_hook<>' won't compile if its parent class is declared using '__declspec(dllexport)' - so rather than exporting each entire class, let's use the alternative approach and export the various class members individually.
list_member_hook<> is very troublesome in MSVC and is known to cause problems in other compilers when used inside a class which has a virtual base class.
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.
Capture latency needs to be updated before playback latency,
various internal parts depend on this order (which is also
the default for libjack itself).
Retain min/max when copying inherited latency from
connected ports.
When there is a direct connection port A out -> port B in,
min/max latency range should be retained in direction
of signal flow.
Ardour can only adjust latency in reverse direction of signal flow
to match min = max with an internal delay-line. ie set playback
latency of an input port, or capture latency of an output port.
This allows to get public latency ranges for any port
including Ardour's latency-compensation as well as including
any latency induced by external JACK applications.
It is mainly useful to detect ambiguous latency and to
forward public port latency of connected ports.
When switching backends, the effective sample-rate is zero.
This only affects the butler thread (the only active thread when
stopped). The actual issue here is the butler calling
"non-realtime-stop" without a backend. However fixing 0/0
generally seems appropriate.
```
#0 in int_div_round<long>(long, long) (x=0, y=0) at ../libs/pbd/pbd/integer_division.h:36
#1 in Temporal::samples_to_superclock(int64_t, int) (samples=0, sr=0) at ../libs/temporal/temporal/superclock.h:39
#2 in Temporal::timepos_t::timepos_t(long) (this=0x7f94bc0a5890, s=0) at ../libs/temporal/temporal/timeline.h:55
#3 in ARDOUR::Automatable::non_realtime_locate(long) (this=0x55a12a980cc8, now=0) at ../libs/ardour/automatable.cc:421
#4 in ARDOUR::Route::non_realtime_locate(long) (this=0x55a12a980ae0, pos=0) at ../libs/ardour/route.cc:5462
#5 in ARDOUR::Session::non_realtime_stop(bool, int, bool&) (this=0x55a12e0cd000, abort=false, on_entry=1, finished=@0x7f94bc0a5e0f: true) at ../libs/ardour/session_transport.cc:1487
#6 in ARDOUR::Session::butler_transport_work(bool) (this=0x55a12e0cd000, have_process_lock=false) at ../libs/ardour/session_transport.cc:1153
#7 in ARDOUR::Butler::thread_work() (this=0x55a12f3b7000) at ../libs/ardour/butler.cc:222
#8 in ARDOUR::Butler::_thread_work(void*) (arg=0x55a12f3b7000) at ../libs/ardour/butler.cc:16
```
Somewhat unbelievably, macOS defines size_t as unsigned long, which the compiler there
believes is distinct from unsigned long long even then they have the same bitwidth
and signedness. We don't have any string converters for unsigned long, only uint64_t
(unsigned long long), so various things break.
Firstly, ::compute_bounding_box() cannot allocate space, so do not try to do that here.
Secondly, if there is no allocation yet, use the CairoWidget's own size_request()
Simply comparing connected latency min/max is insufficient
and allows for false positives.
get_connected_latency_range() reports private, uncompensated
latency for internal ports. In this case an additional test
is required to match it against the reported latency of
connected ports.
Since 13b8a9727bb05 remote connected ports now correctly
report latency for both internal as well as external ports.
Previously Ardour only announced processor latency.
Routes that had additional latency to compensate for those
have not published this delay.
This is of no concern with internal backends, however with JACK,
Ardour reported incorrect *individual* port-latencies of
routes that perform PDC.
Since public port latency now includes delay-compensation,
some extra work is required to unset it before recalculating
latency of paths that include external ports.
Whenever a variable gets declared using 'thread_local' MSVC requires that it should not be compiled with DLL linkage (i.e. it mustn't be exportable). So for Temporal::TempoMap we'll need to export the required members individually, rather than exporting the entire class.