From 39b66ff402cc4b1c566301d01133e39bcc894a4c Mon Sep 17 00:00:00 2001 From: John Anderson Date: Wed, 11 Apr 2007 21:17:20 +0000 Subject: button to add new marker location at current transport position git-svn-id: svn://localhost/ardour2/trunk@1704 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/surfaces/mackie/mackie_control_protocol.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'libs/surfaces/mackie/mackie_control_protocol.cc') diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index aa037ff60e..b1c8ef2ff8 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -1408,3 +1409,27 @@ LedState MackieControlProtocol::channel_right_release( Button & button ) { return off; } + +///////////////////////////////////// +// Functions +///////////////////////////////////// +LedState MackieControlProtocol::marker_press( Button & button ) +{ + // cut'n'paste from LocationUI::add_new_location() + string markername; + nframes_t where = session->audible_frame(); + session->locations()->next_available_name(markername,"mcu"); + Location *location = new Location (where, where, markername, Location::IsMark); + session->begin_reversible_command (_("add marker")); + XMLNode &before = session->locations()->get_state(); + session->locations()->add (location, true); + XMLNode &after = session->locations()->get_state(); + session->add_command (new MementoCommand(*(session->locations()), &before, &after)); + session->commit_reversible_command (); + return on; +} + +LedState MackieControlProtocol::marker_release( Button & button ) +{ + return off; +} -- cgit v1.2.3