From 5bd9bf868f615aed5762deca8d732337763920a6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 29 Oct 2018 21:52:47 +0100 Subject: [PATCH] Safe-guard non-rt-safe sidechain operations This is required by 7d8b93ad for showing error when actively recording. It also prevents other UIs (OSC, Lua,..) to change re-configuring sidechain ports/plugins while recording. --- libs/ardour/route.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 746abc6efd..41a14b096e 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2168,6 +2168,10 @@ Route::reorder_processors (const ProcessorList& new_order, ProcessorStreams* err bool Route::add_remove_sidechain (boost::shared_ptr proc, bool add) { + if (_session.actively_recording ()) { + return false; + } + boost::shared_ptr pi; if ((pi = boost::dynamic_pointer_cast(proc)) == 0) { return false; @@ -2230,6 +2234,10 @@ Route::add_remove_sidechain (boost::shared_ptr proc, bool add) bool Route::plugin_preset_output (boost::shared_ptr proc, ChanCount outs) { + if (_session.actively_recording ()) { + return false; + } + boost::shared_ptr pi; if ((pi = boost::dynamic_pointer_cast(proc)) == 0) { return false; @@ -2276,6 +2284,9 @@ Route::reset_plugin_insert (boost::shared_ptr proc) bool Route::customize_plugin_insert (boost::shared_ptr proc, uint32_t count, ChanCount outs, ChanCount sinks) { + if (_session.actively_recording ()) { + return false; + } boost::shared_ptr pi; if ((pi = boost::dynamic_pointer_cast(proc)) == 0) { return false; -- 2.30.2