provide Session::armed_triggerbox() API
This commit is contained in:
@@ -1342,6 +1342,7 @@ public:
|
||||
bool bang_trigger_at(int32_t route_index, int32_t row_index, float velocity = 1.0);
|
||||
bool unbang_trigger_at(int32_t route_index, int32_t row_index);
|
||||
void clear_cue (int row_index);
|
||||
std::shared_ptr<TriggerBox> armed_triggerbox () const;
|
||||
|
||||
void start_domain_bounce (Temporal::DomainBounceInfo&);
|
||||
void finish_domain_bounce (Temporal::DomainBounceInfo&);
|
||||
|
||||
@@ -8197,3 +8197,20 @@ Session::have_external_connections_for_current_backend (bool tracks_only) const
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::shared_ptr<TriggerBox>
|
||||
Session::armed_triggerbox () const
|
||||
{
|
||||
std::shared_ptr<TriggerBox> armed_tb;
|
||||
std::shared_ptr<RouteList const> rl = routes.reader();
|
||||
|
||||
for (auto const & r : *rl) {
|
||||
std::shared_ptr<TriggerBox> tb = r->triggerbox();
|
||||
if (tb && tb->armed()) {
|
||||
armed_tb = tb;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return armed_tb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user