When a session is loaded, click_io->set_state is called twice.
setup_click() is called when the engine re/starts, and
possibly again from Session::set_state.
During session construction, Port connections are not directly
made. Port::set_state just creates a list, which is later
applied by Port::reconnect from Session::hookup_io.
However, the second call to IO::set_state() calls IO::ensure_ports
again. Since the port already exists, this calls
Port::disconnect_all (while holding the process lock).
Even though the port is not connected at this point in time,
this triggers a ARDOUR::PortManager::connect_callback which
is emitted from the Audioengine when the process-lock is released.
While IO::set_state() continues to set Port::state, and fill
the Port::_[ext_]connections lists, this data is invalidated
moments later when the engine resumes and ::connect_callback
calls ARDOUR::Port::port_connected_or_disconnected.
The solution is to simply not call Port::disconnect_all
if the connection is not yet made (Session::InitialConnecting)
When toggling "Manual Config", Route::customize_plugin_insert()
or Route::reset_plugin_insert() emits processors_changed.
This destroyed the widget from which the change was initiated,
in ppw.clear(), leading to a use-after-free in
ArdourButton::on_button_release_event(_GdkEventButton*) ../libs/widgets/ardour_button.cc:995
The PluginPinDialog does not need to refill the widget list
when manual config is toggled, only the PluginPinWidget itself
needs to updated.
On windows this is still limited by the timer resolution, but
it's a start. This is mainly intended to be used with NDI or
other external sources without actual audio hardware.
`can_change_systemic_latency_when_running()` is only relevant for
Audio. This allows to en/disable MIDI ports and set MIDI port
systemic latency with the PortAudio backend.
This correctly sets audio port I/O latency using the
portaudio API.
Per MIDI device port settings are not completely implemented.
En/disabling MIDI devices or setting custom MIDI port latency
is not functional as-is.
Sequence<Time>::append() expects events to be sorted.
Previously this only worked for non-overlapping region,
or if all events in the later region(s) are after than the
last even in any earlier region.
Ardour::cleanup destroys the TransportMasterManager instance
which unregisters TransportMaster ports. This will crash
if the engine was already destroyed.
See also 7c7bf6c88b
(insert-section still remains hidden, it inserts the length
of the selection at the edit-point, it should perhaps insert
at the start of the selection instead)
This fixes several callsites that were passing samplepos_t to get a TempoMetric,
some of them somewhat significant (e.g. VST plugins that want tempo information).
Bad API design on my part, apologies.
This commit combines libs/ and gtk2_ardour because the new private status
of the ::metric_at() call would be a blocking point for git bisect