triggers: add convenience function to report # of trigger channels
This commit is contained in:
parent
756e0beb1b
commit
4f5106ae82
|
@ -1375,6 +1375,7 @@ public:
|
|||
void trigger_cue_row (int32_t);
|
||||
CueEvents const & cue_events() const { return _cue_events; }
|
||||
|
||||
int num_triggerboxes () const;
|
||||
boost::shared_ptr<TriggerBox> triggerbox_at (int32_t route_index) const;
|
||||
TriggerPtr trigger_at (int32_t route_index, int32_t row_index) const;
|
||||
bool bang_trigger_at(int32_t route_index, int32_t row_index);
|
||||
|
|
|
@ -1806,6 +1806,26 @@ Session::triggerbox_at (int32_t route_index) const
|
|||
return boost::shared_ptr<TriggerBox>();
|
||||
}
|
||||
|
||||
int
|
||||
Session::num_triggerboxes () const
|
||||
{
|
||||
int count = 0;
|
||||
StripableList sl;
|
||||
get_stripables (sl);
|
||||
for (StripableList::iterator s = sl.begin (); s != sl.end (); ++s) {
|
||||
boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route> (*s);
|
||||
if (!r || !r->triggerbox ()) {
|
||||
continue;
|
||||
}
|
||||
/* we're only interested in Trigger Tracks */
|
||||
if (!(r->presentation_info ().trigger_track ())) {
|
||||
continue;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
TriggerPtr
|
||||
Session::trigger_at (int32_t route_index, int32_t trigger_index) const
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue