This fixes an issue on Windows, where UI::run can dispatch
a signal that ends up via cross-thread channel at the surfaces'
BaseUI::request_handler. causing a segfault.
This removes the _io_lock in favor of a RCU.
The reason for this change is to ensure data structure
consistency, notably iterators. Previously adding/removing
ports invalidated iterators, which caused [rare] crashes,
since IO::ports() simply returned a PortSet reference.
(This breaks API)
IRC user MikeLupe reports a Linux/ALSA system that has ports named
Launchpad Mini MK3 LPMiniMK3 DA
Launchpad Mini MK3 LPMiniMK3 MI
(note the truncations). Unclear if this is a failure of some specific
version of ALSA or something unusual about his device, but this
should fix the situation without breaking for anyone else
we control the CC number sent by launchpad faders, and 0x20 is too large
because it causes the faders to overlap with some of the CC values
sent by RHS pads. Parametize the first fader and use it everywhere
This was causing issues with cues when clips were set to gate triggering. A pad
long press was causing the clip to release. Additionally, remove an extra timer
that was being set.
This is not complete, because the symol names are identical, and there's no way (yet)
to ensure which versions Ardour will use if both are dynamically loaded.
There is no thread when an AbstractUI<T> is constructed. The event loop name and the
association between the event loop object and the thread that "runs" it must be
set from within the thread, which is not created until BaseUI::run() is called.
There appears to have been some confusion in e3569b64 about how this
all works; this commit should remove that
e.g. selecting a track causes a ControlNotFoundException
if the ctrl surface is enabled, but no hardware is connected.
terminate called after throwing an instance of 'ArdourSurface::ControlNotFoundExceptio
```
#0 0x00007ffff14d8c2e in __cxa_throw () at /lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007fffe2b560a0 in ArdourSurface::Console1::get_button(ArdourSurface::Console1::ControllerID) const (this=0x61d0017e1c80, id=ArdourSurface::Console1::FOCUS1)
at ../libs/surfaces/console1/console1.cc:928
#2 0x00007fffe2bfc647 in ArdourSurface::Console1::map_select() (this=0x61d0017e1c80) at ../libs/surfaces/console1/c1_operations.cc:653
#3 0x00007fffe2b55384 in ArdourSurface::Console1::map_stripable_state() (this=0x61d0017e1c80) at ../libs/surfaces/console1/console1.cc:832
#4 0x00007fffe2b541ab in ArdourSurface::Console1::set_current_stripable(std::shared_ptr<ARDOUR::Stripable>)
...
```
This does at least fix the crash. Ideally the surface would
only be enabled if there is hardware present.
The sub_config_and_use function recursed, but it also invoked
autowaf.set_local_lib , which however didn't do anything useful. The
HAVE_ defines are not used anywhere, and the AUTOWAF_LOCAL defines are
only used in autowaf.use_lib, which however isn't used anywhere.
Dropping these defines simplify the build environment and makes the
compiler command line half as long and thus makes debugging much more
manageable.