diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h index 1c92882280..841d2946fd 100644 --- a/libs/ardour/ardour/triggerbox.h +++ b/libs/ardour/ardour/triggerbox.h @@ -707,6 +707,13 @@ typedef PBD::RingBuffer CueRecords; class LIBARDOUR_API TriggerBox : public Processor { public: + +#ifdef MIXBUS + static const int32_t default_triggers_per_box = 8; +#else + static const int32_t default_triggers_per_box = 16; +#endif + TriggerBox (Session&, DataType dt); ~TriggerBox (); diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 3ead89210a..efd7786005 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -839,9 +839,6 @@ enum CueBehavior { typedef std::vector CaptureInfos; -const int32_t default_triggers_per_box = 8; - - struct FollowAction { enum Type { None, diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 9ff4028a65..c6ed77d47b 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -3066,11 +3066,11 @@ TriggerBox::TriggerBox (Session& s, DataType dt) /* default number of possible triggers. call ::add_trigger() to increase */ if (_data_type == DataType::AUDIO) { - for (uint32_t n = 0; n < default_triggers_per_box; ++n) { + for (uint32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) { all_triggers.push_back (boost::make_shared (n, *this)); } } else { - for (uint32_t n = 0; n < default_triggers_per_box; ++n) { + for (uint32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) { all_triggers.push_back (boost::make_shared (n, *this)); } } @@ -4369,7 +4369,7 @@ TriggerBox::determine_next_trigger (uint32_t current) uint32_t runnable = 0; std::vector possible_targets; - possible_targets.reserve (default_triggers_per_box); + possible_targets.reserve (TriggerBox::default_triggers_per_box); /* count number of triggers that can actually be run (i.e. they have a region) */ @@ -4481,7 +4481,7 @@ TriggerBox::determine_next_trigger (uint32_t current) break; case FollowAction::JumpTrigger: - for (std::size_t n = 0; n < default_triggers_per_box; ++n) { + for (std::size_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) { if (fa.targets.test (n) && all_triggers[n]->region()) { possible_targets.push_back (n); } diff --git a/libs/surfaces/push2/cues.cc b/libs/surfaces/push2/cues.cc index b611f2295c..df5bab2e28 100644 --- a/libs/surfaces/push2/cues.cc +++ b/libs/surfaces/push2/cues.cc @@ -957,7 +957,7 @@ FollowActionIcon::render (ArdourCanvas::Rect const & area, Cairo::RefPtrfollow_action0().targets.count() == 1 ) { //Jump to a specific row; just draw the letter of the row we are jumping to int cue_idx = -1; - for (int i = 0; i < default_triggers_per_box; i++) { + for (int i = 0; i < TriggerBox::default_triggers_per_box; i++) { if (trigger->follow_action0().targets.test(i)) { cue_idx = i; break;