From a8f58105a9b5eaeb4d93940a69f8dde8bc595233 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 13 Oct 2024 21:16:22 -0600 Subject: [PATCH] provide a class-level static PBD::Signal for Trigger (Slot) arming --- libs/ardour/ardour/triggerbox.h | 2 ++ libs/ardour/triggerbox.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h index 0b2cf048f8..d4ce8c624e 100644 --- a/libs/ardour/ardour/triggerbox.h +++ b/libs/ardour/ardour/triggerbox.h @@ -301,6 +301,7 @@ class LIBARDOUR_API Trigger : public PBD::Stateful { virtual void disarm (); bool armed() const { return _armed; } PBD::Signal0 ArmChanged; + static PBD::Signal1 TriggerArmChanged; Temporal::BBT_Argument compute_start (Temporal::TempoMap::SharedPtr const &, samplepos_t start, samplepos_t end, Temporal::BBT_Offset const & q, samplepos_t& start_samples, bool& will_start); virtual timepos_t compute_end (Temporal::TempoMap::SharedPtr const &, Temporal::BBT_Time const &, samplepos_t, Temporal::Beats &) = 0; @@ -808,6 +809,7 @@ class LIBARDOUR_API TriggerBox : public Processor, public std::enable_shared_fro void set_record_enabled (bool yn); RecordState record_enabled() const { return _record_state; } PBD::Signal0 RecEnableChanged; + static PBD::Signal0 TriggerRecEnableChanged; void arm_from_another_thread (Trigger& slot, samplepos_t, uint32_t chans); void disarm(); diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 07009ba208..13591c569f 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -210,6 +210,7 @@ FollowAction::to_string () const Trigger * const Trigger::MagicClearPointerValue = (Trigger*) 0xfeedface; PBD::Signal2 Trigger::TriggerPropertyChange; +PBD::Signal1 Trigger::TriggerArmChanged; Trigger::Trigger (uint32_t n, TriggerBox& b) : _launch_style (Properties::launch_style, OneShot) @@ -293,6 +294,7 @@ Trigger::arm () _box.arm_from_another_thread (*this, _box.session().transport_sample(), 2); _armed = true; ArmChanged(); /* EMIT SIGNAL */ + TriggerArmChanged (this); } void