Running Ardour on 32 bit ARM without hardware floating point
unit may be considered civil disobedience. But we understand that
it is incumbent on the young to disobey :)
Various actions are set as insensitive during editor c'tor.
When the macOS global menu is created those were marker as
sensitive, while GTK's internal state (private_data->sensitive)
was set to false. This lead to to inconsistencies.
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
recent gcc (>=11) sets _WIN32_WINNT >= 0x602 which changes
QS_ALLINPUT to include (QS_TOUCH | QS_POINTER) events which are
only available on Windows 8 and later. Listening to those events
makes ardour unresponsive.
Notably Ardour's General MIDI Synth has no presets, but
users try.
This also prevents presets of plugins with internal state,
but no user visible controls. But those usually have a plugin
provided presets.
When loading the state of a Route fails (here
"unknown enumerator SurroundMaster in PBD::EnumWriter"), the
routes which have already been loaded are not added to the
Session's routelist.
Already existing routes that have an InternalSend or have
a circular reference:
The Send's `_send_from` holds a shared pointer
`<Route>(shared_from_this())` to the Route, and the
Route's ProcessorList contains the InternalSend.
This leads to various
"SessionHandleRef exists across session deletion" of
IO, Ports, GraphNode, Graph, etc
which causes issues when loading another session.
Session::destroy() cleans calls drop_references for
each route in the RouteList, which breaks the circular
dependency (InternalSend drops reference to Route).
But here the RouteList is empty.
Crash fixed:
* Load a session that fails to load a Route
(here a session created on with the vapor branch, on master)
* Then load another session without restarting Ardour.
When copying a mono LV2 plugin to a stereo track, the
state of the copied mono plugin is copied to the replicated
instance.
However at this point in time PBD::Stateful::ForceIDRegeneration
is still enabled, and the state ID has not been set.
This used to not be an issue. Older versions of liblilv
handle non-existent paths just fine.
However in lilv v0.24.20-10-gdd5e851 `lilv_path_absolute`
was replaced with `zix_canonical_path` which returns NULL
if a state file does not [yet] exist. This lead to a segfault
due to strlen(NULL) in `serd_node_new_file_uri`:
#0 strlen -- SEGV on unknown address 0x000000000000
#1 serd_node_new_file_uri () at /lib/x86_64-linux-gnu/libserd-0.so.0
#2 lilv_state_new_from_file () at /lib/x86_64-linux-gnu/liblilv-0.so.0
#3 ARDOUR::LV2Plugin::set_state(XMLNode const&, int) at ../libs/ardour/lv2_plugin.cc:2320
* yabridge runs the plugin's process function in a dedicated
bridged thread. Ardour's process thread is not (it just waits)
* When a plugin calls `restartComponent` from the realtime
thread. yabridge uses a host notification thread to perform
the callback.
Unlike other VST3 implementations that use a notification thread
(eg. JUCE), yabridge blocks and waits for the notification to
complete before the realtime thread can continue.
This leads to a deadlock.
However, we know that yabridge always synchronizes the
callback and concurrent calls are prevented by yabridge's design.
https://github.com/robbert-vdh/yabridge/issues/266
Locations::ripple can never add/remove markers, hence
Locations::changed is not applicable.
That signal is to indicate when more than one location is
added or removed from the location list.
Undo sets the state of ALL Locations, which resulted in
at least two signals for each Location (name changed,
start+end changed), even if there was no change.
This is in preparation to reduce signals during
Location Drag motion (which operates on a copied
Location, that causes [static] signal emissions,
but the location itself is not in any list).
Every call to ::next_section() copies the location list
and sorts all the regions.
If the session has a significant amount of Locations and
Section Marker (#9568 has 300+) sorting them each time
when iterating over sections is significant.
Exporting a dedicated Range should not be constrained by
session markers. This fixes at least 2 issues:
* export could be cut short when using latent plugins
* exporting a range crossing the session end marker was cut short
When a user first connected a port to the Timecode master
input and then disconnected a previous port, the Timecode
master assumed it was not connected.
Previously the port-engine was a LIFO. Changes were pushed back
and then popped-back. This causes issues when re-connecting
Transport Masters.
The GUI does the following when changing connections:
1. disconnect all
2. connect to new port
which lead to TransportMaster::connection_handler being called
in reverse order: connect, disconnect, and the transport
master was assumed to not be connected.
--
Now connections queue is a FIFO and code was consolidated.
(Note, we cannot use a std::deque because it does not support
memory pre-allocation with ::reserve)
The former was incorrectly implemented, and the latter has already been tested more
in real life.
We should likely remove ::remove_time also and use shift() there too, but that
requires testing negative shifts more broadly.
Ardour accidentally removed nascent source-files during cleanup.
This can lead to missing files when recording directly after a
cleanup.
This also ensures that there are no duplicates in the
dead-sources (file sources unused in the current snapshot) list.
parens were in the wrong place - we need to add the ::magnitude() of
the tick-based duration AFTER conversion of audio-time position to beats, not
before.
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.
This can happen with snapshots or after save-as with
.ardour session files having different "Names" in the same path.
Or simply by saving a session on macOS in /tmp (which is really
/private/tmp).
This likely needs checking for all surfaces that inherit from MidiSurface. It is clearly
the correct thing to have in the code, but existing behavior might be predicated on
the former incorrect connection
This is perhaps a better solution than b8551eed7e
and 8d0a655608 and 7942897d93. It is certainly less
fragile.
It is more consistent with other plugin standards,
where modules are closed with the last instance in a session.
Then again keeping the VST3 factory around is beneficial
when switching snapshots.
Discuss, and let's watch for issues when re-loading a
previously unloaded VST3 module.
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.
Some plugins call restartComponent(Vst::kParamTitlesChanged)
when their GUI is created, from the call that creates the UI.
This lead to a stack-overflow recursion in Ardour:
ProcessorBox::redisplay_processors -> VST3Plugin::has_editor
-> [plugin] -> VST3::restartComponent -> signal proc changed
-> ProcessorBox::redisplay processors
Since 62fc1d3c2e, Delivery buffers were flushed twice.
Once by copy_to_outputs() and again later by
Delivery::flush_buffers. This resulted in duplicate events
during export (see 576840c09e, MIDI buffers are not cleared
after flush to allow export processing to grab the data from
the port-buffers).
The workaround in 62fc1d3c2e is only relevant for ClickIO,
other Deliveries (Send is a Delivery) are explicitly flushed
by Route::flush_processor_buffers_locked.
This reverts commit 615326be9b because it
breaks windows builds.
```
File "/home/ardour/ardour-w64/wscript", line 1462, in configure
set_compiler_flags (conf, Options.options)
File "/home/ardour/ardour-w64/wscript", line 522, in set_compiler_flags
if re.search ('x86_64-w64', conf.env['CC']) is not None:
File "/usr/lib/python2.7/re.py", line 146, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or buffer
```
Region::fade_range emits a signal which will call
ARDOUR::Playlist::region_bounds_changed, which takes a WriteLock.
That resulted in a WriteLock with ReadLock held.
CC is already set to a string. (And if it ever should be None, we want
to handle that explicitly.)
(And #autowaf.display_msg handle Booleans just fine.)
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.
https://waf.io/book/ says
By default, the project name and version are set to noname and 1.0. To
change them, it is necessary to provide two additional variables in
the top-level project file
- and waf code inspection confirms that waf itself only will use the top
level APPNAME.
autowaf has no real shutdown functionality anyway. The automatic
shutdown function that could have been called wouldn't work anyway, as
it takes an argument.
The only reason it doesn't fail is that the top level wscript has no
shutdown handling and doesn't recurse to other scripts, so it is all
dead code.