Compare to PluginInsert::set_state(). The sidechain must not
inherit the name from the template track. That leads
to port-name ambiguities.
Also later there will be a crash when ::update_sidechain_name()
calls IO::set_name since: _name is not found in _current_name.
This fixes an issue when adding a MIDI track, but there there
are no session-buffers for it, leading to:
ARDOUR::Buffer& ARDOUR::BufferSet::get_available(ARDOUR::DataType, size_t): Assertioni < _available.get(type)' failed.
Just like PluginInsert::update_sidechain_name, the name is
implicitly set, using the owning route's name, suffixed with the
[i18n localized] Processor name.
This fixes an issue if a track is renamed and a new track with
the old name is created. This commonly happens during File Import:
For each ImportAsTrack a generic named track (e.g. "Audio") is created
before it is renamed.
Previously this lead to
Failed to register port "Audio 1-trig/midi_in 1", reason is unknown from here
Audio ports are sorted using PBD::naturally_less.
PBD::naturally_less is also used as compare function
for port-lists, port-sets, and port-maps.
So in sets and maps, the function is used to test
for uniqueness. This lead to issues since naturally_less
treats whitespace and underscores as identical.
While it was possible to have routes named "Audio_1",
and "Audio 1", this resulted in missing ports for one
of the routes.
see also 60ff3ef764
Retain min/max when copying inherited latency from
connected ports.
When there is a direct connection port A out -> port B in,
min/max latency range should be retained in direction
of signal flow.
Ardour can only adjust latency in reverse direction of signal flow
to match min = max with an internal delay-line. ie set playback
latency of an input port, or capture latency of an output port.
Previously Ardour only announced processor latency.
Routes that had additional latency to compensate for those
have not published this delay.
This is of no concern with internal backends, however with JACK,
Ardour reported incorrect *individual* port-latencies of
routes that perform PDC.
Since public port latency now includes delay-compensation,
some extra work is required to unset it before recalculating
latency of paths that include external ports.
When a track's output is not connected, its alignment
can /float/. Previously it assumed the worst (compensate
for worst-case latency).
The track itself has no playback latency, so any send would
delay the 'thru' path to match the send's playback latency.
This resulted in the track reporting a non-zero latency which
is not really present, nor relevant.
It was possible that auto-connect-thread or GUI thread called
DelayLine::set_delay without acquiring the process-lock.
Changing the delay while processing is not supported and
can cause glitches.
backtrace:
```
DelayLine::set_delay
Send::update_delaylines
Send::set_delay_out
InternalReturn::set_playback_offset
Route::update_signal_latency
Session::update_route_latency
Session::update_latency_compensation
Session::auto_connect_thread_run
```
"While 'atomic' has a volatile qualifier, this is a historical
artifact and the pointer passed to it should not be volatile."
Furthermore "It is very important that all accesses to a
particular integer or pointer be performed using only this API"
(from https://developer.gnome.org/glib/2.68/glib-Atomic-Operations.html)
Hence initialization of atomic variables is changed to also use
this API, instead of directly initializing the value.
This also fixes a few cases where atomic variables were
accessed directly.
see also libs/pbd/pbd/g_atomic_compat.h
This slowly un/mutes the direct monitor signal when listen state
changes.
Listen sends already fade in as well. However un-soloing still
hard-removes the listen send path.
When a route's output is connected to multiple busses, re-establishing
port-connections on session-load calls Route::output_change_handler
multiple times.
Implicit solo counts are saved and restored by the route's SoloControl,
however the output_change_handler invalidated it on session load.
Since connections are restored iteratively, counting soloed downstream
routes will yield an incorrect result until all connections are
established.
This fixes the issue that implicit solo is lost on session-reload
in case a route has multiple connections with different up/downstream
solo states.
* Include main-out channel-count when bouncing the output
* Do not de-activate disk-reader and mains-out when freezing a track
* Ignore meter when counting channels