From b3497b3f8f65b63f7010e25df8afccc6355230e0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 3 Jun 2022 17:14:35 +0200 Subject: [PATCH] Debug noseq's audition issue - silent plugin processing When auditioning, ardour's process_audition calls Route::silence for all routes. PluginInsert::silence simply fed all [ports of all [replicated] plugins with silence, regardless of port-mapping. This can cause some VST2/3 plugins to change state, and enable ports (e.g. stereo VST2 plugins on mono tracks), causing glitches. This commit is mainly intended to investigate how significant this glitch is when starting to audition. --- libs/ardour/plugin_insert.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 48b3300ba5..2e589dfcc1 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -1254,6 +1254,13 @@ PluginInsert::bypass (BufferSet& bufs, pframes_t nframes) void PluginInsert::silence (samplecnt_t nframes, samplepos_t start_sample) { +#if 1 + /* use actual process function with silent scratch buffers */ + BufferSet& bufs = _session.get_scratch_buffers (_required_buffers, true); + bufs.silence (nframes, 0); + bool roll = _session.transport_rolling (); + run (bufs, start_sample, start_sample + (roll ? nframes : 0), roll ? 1 : 0, nframes, true); +#else automation_run (start_sample, nframes, true); // evaluate automation only if (!_pending_active) { @@ -1290,6 +1297,7 @@ PluginInsert::silence (samplecnt_t nframes, samplepos_t start_sample) (*i)->connect_and_run (_session.get_scratch_buffers (maxbuf, true), start_sample, start_sample + nframes, 1.0, in_map, out_map, nframes, 0); } _timing_stats.update (); +#endif } void