When copying regions from multiple tracks, use the same
time domain for each region (depends on grid).
The primary region position is set the time-domain from
RegionMotionDrag::_last_position replacing the region's
prior time-domain. Other regions should follow suit and not
retain their time-domain.
Fixes: Enable snap-to-grid, select regions on multiple tracks,
ctrl+drag copy them.
This allows to properly toggle "Glue to Bars/Beats".
Editor::toggle_region_lock_style uses Region::position_time_domain(),
However Region::set_position_time_domain() checked the duration's
time-domain.
Furthermore timecnt_t::set_time_domain() changes both the
position and the duration's time domain. This can lead to
various issues. We only need to change the time-domain of
the timepos_t _position.
IParameterChanges (_input_param_changes) queue should not be
modified while the plugin processes. Doing so can lead to invalid
iterators.
Also activate/deactivate and state restore must not happen
concurrently with processing.
Some plugins (e.g. Roland JD-800) have zero controls, but
MIDI control with are not directly accounted for. This
results in a zero-size ParameterChanges queue, which later produced
a segfault when trying to enqueue a MIDI change:
```
input_param_changes.addParameterData (id, index)->addPoint (sample_off, value, index);
```
This is intended to fix an issue with odd filenames on Windows,
particularly forward and backwards single quotes as part of a filename.
Previously the filename was passed as parameter to ffmpeg as
UTF-8 string to SystemExec::make_wargs, which is fragile on Windows
in absence of a execve() call.
signal_sources() can traverse upwards. e.g. when creating a
foldback send to the master-bus, everything that feeds the master
also feeds the foldback (even if there is no direct send).
This test seems to be compiling and passing just fine (when run in
isolation), so turning it back on seems like a good idea. To make it
pass when run as part of the full ardour test suite, this does remove
the WebSockets control surface from the control surfaces test though, as
that control surface messes up the event loop of the main thread, which
would otherwise cause use-after-free crashes in the session test.
Extra "other" ("External") ports were already being grouped by their
common prefix into bundles to better display ports coming from different
jack clients. This commit factors out that logic into a separate method
to also apply this logic to extra "system" ("Hardware") ports. This way
hardware ports from different devices/clients (for example when using
pipewire as jack backend) are grouped by device rather than all being
listed as one bundle.
This also fixes a potential buffer overlow on Windows.
Window _snprintf does not null terminate the string in case
the formatted length is longer than the given buffer size.
http://msdn.microsoft.com/en-us/library/2ts7cx93%28v=vs.110%29.aspx
(mingw's uses _vsnprintf under the hood which is also affected).
Alternatively we could rely in g_snprintf() to truncate the
string.
Session::setup_bundles() creates mono and stereo bundles from hardware
inputs and outputs. For mono bundles the name of the bundle was based on
the pretty name of the port (if the port has a pretty name), however
stereo bundles always used the indices of ports to make the name.
When using pipewire (or otherwise having multiple jack clients exposing
physical ports) the indices are even less meaningful than otherwise (as
different devices could appear in arbitrary order), so also using pretty
names for stereo bundles makes the UI less confusing in places where
these bundle names are used (for example the menu when clicking on an
IOButton).
Previously AudioPlaylist::read always returned the timecnt that
it was supposed to read into the buffer, regardless if the given
number of samples was read. The check in DiskReader::refill_audio
`if (nread != to_read)` never triggered.
This can happen when changing an audio-region's time-domain to
music-time (glue to bars/beats). Region-length (beats converted
to samples) can exceed the actual audio-source length (in samples).