This unconditionally enable all busses with connected pins.
It does not provide re/configurable I/O (like Audio Unit), nor
implement dynamic Vst::kIoChanged callbacks. But regardless
this allows for plugins with multiple I/O busses (e.g. drum synths).
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)`
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.
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.
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.
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).