When not using inplace processing (because I/O pins connections
are not an identity matrix), dedicated inplace-buffers are used.
Those buffers contain silence on unused ports, and hence always
valid to use. However it is still useful for plugins to know
if a plugin-port is actually used. VST3 can disable busses
for unconnected pins.
This resolves an ambiguity between abs(int) and std::abs(T) which
depends on context and compiler version and optimization.
In context of #9057, (gcc-6.3 -O3) math.h `abs(int)` was used. This
truncated the superclock value to 31 bit in ControlList::extend_to.
The previous code only used the 1st multiplicand was use to
determine the direction of rounding, breaking commutative property
`muldiv_round (1, 3, 4) != muldiv_round (3, 1, 4)`
This concept from 2007 is no longer required Temporal::get_grid
already limits the number of grid-lines depending on the step
size (mod-bar, beat_div) and start/end positions.
Previously the current iterator bbt was moved to p->bbt().
From then on, no grid line is reached if the point p is not on
a bar and mod_bar != 0 or the point is not on an expected beat_div.
e.g. when using bbt += mod_bar, and a tempo-change is at 5|2|0.
iterations continues 6|2|0 7|2|0 is_bar() is always false
and no more grid-lines were added.
Rather than trying
bbt = round-up-to-next-grid-mod-div
and then finding the metric for that position, this
approach only does the latter using the already incremented
BBT position.
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).