From c452dcda5305ed5f7afb15b96537f4eb712dacbf Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 22 Jul 2021 10:33:00 -0600 Subject: [PATCH] add access for triggerbox as a well-known (possibly null) processor in a route --- libs/ardour/ardour/route.h | 3 +++ libs/ardour/route.cc | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index f508182e2e..95ae213d94 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -95,6 +95,7 @@ class VCA; class SoloIsolateControl; class PhaseControl; class MonitorControl; +class TriggerBox; class LIBARDOUR_API Route : public Stripable, public GraphNode, @@ -212,6 +213,7 @@ public: boost::shared_ptr peak_meter() { return _meter; } boost::shared_ptr peak_meter() const { return _meter; } boost::shared_ptr shared_peak_meter() const { return _meter; } + boost::shared_ptr triggerbox() const { return _triggerbox; } void flush_processors (); @@ -702,6 +704,7 @@ protected: boost::shared_ptr _volume; boost::shared_ptr _meter; boost::shared_ptr _polarity; + boost::shared_ptr _triggerbox; bool _volume_applies_to_output; diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 01b5bb1a7c..2f2a24ceca 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -92,6 +92,7 @@ #include "ardour/session.h" #include "ardour/solo_control.h" #include "ardour/solo_isolate_control.h" +#include "ardour/triggerbox.h" #include "ardour/types_convert.h" #include "ardour/unknown_processor.h" #include "ardour/utils.h" @@ -1029,6 +1030,7 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr // check if there's an instrument to replace or configure for (ProcessorList::const_iterator i = others.begin(); i != others.end(); ++i) { + boost::shared_ptr pi; if ((pi = boost::dynamic_pointer_cast(*i)) == 0) { continue; @@ -1093,6 +1095,11 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr for (ProcessorList::const_iterator i = others.begin(); i != others.end(); ++i) { + boost::shared_ptr tb = boost::dynamic_pointer_cast (*i); + if (tb) { + _triggerbox = tb; + } + if (*i == _meter) { continue; }