This fixes an issue with Blendeq (and likely other plugins)
that call `restartComponent(Vst::kLatencyChanged) from the
in realtime context from plugin's process
* HitCreateDrag::start_grab does not need to do anything
a hit cannot be past end of region. Drawing at or past
the end of a region will create a new region (not an event)
* HitCreateDrag::finished now calculates the position like
NoteCreateDrag::finished.
* the selection does not need to be cleared. Creating new
notes/hits selectes the newly created ones.
e.g. loading a u-he zebra preset using the plugin's GUI
internally changes the controller state without using the
`performEdit` API, but instead calls `restartComponent` wit
the `kParamValuesChanged` flag to perform a a batch update.
This now also updates Ardour's AutomationControl to match.
The old code could not snap to the grid, because it had a lot of confusion about pixels vs. time,
and between line-origin-relative time and absolute time
Now that we can require glibc 2.3.4, we can use RTLD_DEEPBIND.
This can help with plugins that do no hide symbols for their
contained statically linked libraries, and instead would use
use symbols.
Note: This only works on Linux.
CPUID is part of x86_64 ISA to query CPU features. In order to determine
AVX512F ISA extension, EAX and ECX needs to be set to 7 and 0
respectively before invoking `cpuid` instruction. This commit also
removes inline assembly for __cpuid in favor of using compiler provided
intrinsic functions. Both GCC and clang provides __cpuid like function
via __cpuid_count intrinsic.
This commit also creates a portable wrapper over compiler intrinsic
functions, __cpuid and __cpuidex. `cpuid' provides base level ISA query
and `cpuidex` provides extra extension information like AVX512F. These
wrappers lean towards MSVC like API.
References:
CPUID Docs: https://en.wikipedia.org/wiki/CPUID
GCC's ``docs" on __cpuid_count:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/i386/cpuid.h
Clang's docs on __cpuid_count:
https://clang.llvm.org/doxygen/cpuid_8h.html
MSVC's docs on __cpuid and __cpuidex:
https://learn.microsoft.com/en-us/cpp/intrinsics/cpuid-cpuidex
Despite what the docs say Gtk::HScale(0,1,s) with a step-size
s > 0 has a range [0, 1 - s]. GTKMM does allow for a step-size
of zero, which also works around this issue.
This works because gtkmm sidesteps gtk_hscale_new_with_range() which
would fail with g_return_val_if_fail (step != 0.0, NULL);
The reason for this is that gtkmm creates an Adjustment with a
page-size = step-size:
```
Adjustment* adjustment = manage(new Adjustment(min, min, max, step, 10 * step, step));
```
and `gtk_adjustment_configure` limits the range:
```
value = MIN (value, upper - page_size);
```