basic_ui: use session-provided bang/unbang functions
This commit is contained in:
parent
29dc388bbc
commit
6c292a83da
@ -836,43 +836,15 @@ BasicUI::find_trigger (int x, int y)
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::bang (int x, int y)
|
||||
BasicUI::bang_trigger_at (int x, int y)
|
||||
{
|
||||
boost::shared_ptr<Route> r = session->get_remote_nth_route (x);
|
||||
if (!r) {
|
||||
return;
|
||||
}
|
||||
boost::shared_ptr<TriggerBox> tb = r->triggerbox();
|
||||
|
||||
if (!tb || !tb->active()) {
|
||||
return;
|
||||
}
|
||||
|
||||
TriggerPtr tp (tb->trigger (y));
|
||||
|
||||
if (!tp) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (tp) {
|
||||
tp->bang ();
|
||||
}
|
||||
session->bang_trigger_at (x, y);
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::unbang (int x)
|
||||
BasicUI::unbang_trigger_at (int x, int y)
|
||||
{
|
||||
boost::shared_ptr<Route> r = session->get_remote_nth_route (x);
|
||||
if (!r) {
|
||||
return;
|
||||
}
|
||||
boost::shared_ptr<TriggerBox> tb = r->triggerbox();
|
||||
|
||||
if (!tb || !tb->active()) {
|
||||
return;
|
||||
}
|
||||
|
||||
tb->stop_all_quantized ();
|
||||
session->unbang_trigger_at (x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -167,9 +167,9 @@ class LIBCONTROLCP_API BasicUI {
|
||||
bool rewind_button_onoff() const;
|
||||
bool loop_button_onoff() const;
|
||||
|
||||
void bang (int x, int y);
|
||||
/* stop whatever is playing in the nth triggerbox */
|
||||
void unbang (int x);
|
||||
void bang_trigger_at (int x, int y);
|
||||
void unbang_trigger_at (int x, int y);
|
||||
|
||||
/* it would be nice to use TriggerPtr here but that implies including ardour/triggerbox.h */
|
||||
boost::shared_ptr<ARDOUR::Trigger> find_trigger (int x, int y);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user