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/
MSVC is happy to ignore the above pragma although it aborts the build if it encounters #warning
#pragma GCC warning seems to work fine here for Clang - so start by changing just 1 x file to see if there's any detrimental effect for the other builds.
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))