Plugins rewrite the buffer data in-place and some plugins
can produce output even when fed with silence.
Hence, during a PluginInsert::silence() run a plugin can
inject data into the "silent" buffers which causes side-effects.
Kudos to Chris 'oofus' Goddard for finding this issue.
"scratch buffers are by definition scratch and their contents are undefined at all times"
"silent buffers are by definition all-zero and should not be used for real data"
But track & route were using those for actual data; plugins (which may run
in the same thread and may get the same buffers) use them for scratch thereby
overwriting real data.
In particular get_silent_buffers() (used by LadspaPlugin::connect_and_run)
clears the buffer which can holds real data:
e.g. via Route::passthru_silence() -> plugin1 -> plugin2 (clears output of plugin1)
- replaces fix in 066df0d218
- Check if _LIBCPP_VECTOR is defined for vector_delete.
This is defined in libc++'s headers which Apple is using
instead of libstdc++
before this change:
1) switch to 'custom' meter point,
2) deactivate meter processor.
-> meters does not run regardless of meter-point
-> meter can only be re-nabled in 'custom' mode
..and continue to calculate fall-off in
audio-cycle (rather than UI thread)
TODO: check if this works properly when switching
between audio/midi meter modes on a midi-track.
One of the motivations to always reset meters when the
meter-point changes was to resolve peak-hold & fall-off
issues when a midi-meter replaces an audio-meter and vice
versa.
gtkmm2ext/keyboard.cc has a special case to emit a signal on the key-up of
the modifier key used to adjust track heights in conjunction with the
scroll wheel, so that the same track continues to be resized even when
it's shrunk to no longer be under the mouse cursor. However, this code
assumed that the modifier key for this was <Shift>.
Fix it to use the event->state bit corresponding to
ScrollZoomVerticalModifier instead, and rename the relevant functions to
clarify that it's the 'zoom vertical' modifier key they're dealing with.
Partially fixes#5610.