13
0

implement mark_in, mark_out, toggle_click

This commit is contained in:
Ben Loftis 2016-01-15 17:11:19 -06:00 committed by Robin Gareus
parent f0d9295dd6
commit 36e1ff48bc
4 changed files with 32 additions and 4 deletions

View File

@ -345,6 +345,24 @@ BasicUI::jump_by_bars (double bars)
session->request_locate ( session->convert_to_frames (any) );
}
void
BasicUI::mark_in ()
{
access_action("Editor/start-range");
}
void
BasicUI::mark_out ()
{
access_action("Editor/finish-range");
}
void
BasicUI::toggle_click ()
{
access_action("Transport/ToggleClick");
}
bool
BasicUI::locating ()
{

View File

@ -81,6 +81,11 @@ class LIBCONTROLCP_API BasicUI {
void redo ();
void toggle_punch_in ();
void toggle_punch_out ();
void mark_in();
void mark_out();
void toggle_click();
void set_record_enable (bool yn);
bool get_record_enabled ();

View File

@ -362,6 +362,9 @@ OSC::register_callbacks()
REGISTER_CALLBACK (serv, "/ardour/toggle_all_rec_enables", "", toggle_all_rec_enables);
REGISTER_CALLBACK (serv, "/ardour/jump_bars", "f", jump_by_bars);
REGISTER_CALLBACK (serv, "/ardour/jump_seconds", "f", jump_by_seconds);
REGISTER_CALLBACK (serv, "/ardour/mark_in", "", mark_in);
REGISTER_CALLBACK (serv, "/ardour/mark_out", "", mark_out);
REGISTER_CALLBACK (serv, "/ardour/toggle_click", "", toggle_click);
/*
@ -392,10 +395,9 @@ OSC::register_callbacks()
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_punch_out", "f", toggle_punch_out);
REGISTER_CALLBACK (serv, "/ardour/pushbutton/rec_enable_toggle", "f", rec_enable_toggle);
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_all_rec_enables", "f", toggle_all_rec_enables);
//ToDo
// REGISTER_CALLBACK (serv, "/ardour/pushbutton/mark_in", "f", mark_in);
// REGISTER_CALLBACK (serv, "/ardour/pushbutton/mark_out", "f", mark_out);
REGISTER_CALLBACK (serv, "/ardour/pushbutton/mark_in", "f", mark_in);
REGISTER_CALLBACK (serv, "/ardour/pushbutton/mark_out", "f", mark_out);
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_click", "f", toggle_click);
REGISTER_CALLBACK (serv, "/ardour/routes/mute", "ii", route_mute);
REGISTER_CALLBACK (serv, "/ardour/routes/solo", "ii", route_solo);

View File

@ -192,6 +192,9 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
PATH_CALLBACK(toggle_punch_out);
PATH_CALLBACK(rec_enable_toggle);
PATH_CALLBACK(toggle_all_rec_enables);
PATH_CALLBACK(mark_in);
PATH_CALLBACK(mark_out);
PATH_CALLBACK(toggle_click);
#define PATH_CALLBACK1(name,type,optional) \
static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \