diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h index f38369c47e..42c6f94089 100644 --- a/libs/ardour/ardour/triggerbox.h +++ b/libs/ardour/ardour/triggerbox.h @@ -536,6 +536,9 @@ class LIBARDOUR_API TriggerBox : public Processor ~TriggerBox (); static CueRecords cue_records; + static bool cue_recording () { return _cue_recording; } + static void set_cue_recording (bool yn); + static PBD::Signal0 CueRecordingChanged; void run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes, bool result_required); bool can_support_io_configuration (const ChanCount& in, ChanCount& out); @@ -706,6 +709,7 @@ class LIBARDOUR_API TriggerBox : public Processor static void init_pool(); static std::atomic active_trigger_boxes; + static std::atomic _cue_recording; }; class TriggerReference diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 11d1d30c57..71176c5c3e 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -2184,6 +2184,8 @@ int TriggerBox::_first_midi_note = 60; std::atomic TriggerBox::active_trigger_boxes (0); TriggerBoxThread* TriggerBox::worker = 0; CueRecords TriggerBox::cue_records (256); +std::atomic TriggerBox::_cue_recording (false); +PBD::Signal0 TriggerBox::CueRecordingChanged; void TriggerBox::init () @@ -2225,6 +2227,15 @@ TriggerBox::TriggerBox (Session& s, DataType dt) Config->ParameterChanged.connect_same_thread (*this, boost::bind (&TriggerBox::parameter_changed, this, _1)); } +void +TriggerBox::set_cue_recording (bool yn) +{ + if (yn != _cue_recording) { + _cue_recording = yn; + CueRecordingChanged (); + } +} + void TriggerBox::set_region (uint32_t slot, boost::shared_ptr region) {