From 2b630c48876e77b732c85e4ff84b4182cb1fd4a7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Mar 2022 12:19:11 -0600 Subject: [PATCH] triggerbox: add TriggerBox::dump() to check trigger states --- libs/ardour/ardour/triggerbox.h | 2 ++ libs/ardour/triggerbox.cc | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h index e274f18299..d153730f83 100644 --- a/libs/ardour/ardour/triggerbox.h +++ b/libs/ardour/ardour/triggerbox.h @@ -800,6 +800,8 @@ class LIBARDOUR_API TriggerBox : public Processor static PBD::PropertyChange all_trigger_props(); + void dump (std::ostream &) const; + private: struct Requests { std::atomic stop_all; diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 5a16bf2869..9e387c9648 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -4316,6 +4316,15 @@ TriggerBox::non_realtime_locate (samplepos_t now) fast_forward (_session.cue_events(), now); } +void +TriggerBox::dump (std::ostream & ostr) const +{ + ostr << "TriggerBox " << order() << std::endl; + for (auto const & t : all_triggers) { + ostr << "\tTrigger " << t->index() << " state " << enum_2_string (t->state()) << std::endl; + } +} + /* Thread */ MultiAllocSingleReleasePool* TriggerBoxThread::Request::pool = 0;