}
}
+void
+BasicUI::loop_location (framepos_t start, framepos_t end)
+{
+ Location* tll;
+ if ((tll = session->locations()->auto_loop_location()) == 0) {
+ Location* loc = new Location (*session, start, end, _("Loop"), Location::IsAutoLoop);
+ session->locations()->add (loc, true);
+ session->set_auto_loop_location (loc);
+ } else {
+ tll->set_hidden (false, this);
+ tll->set (start, end);
+ }
+}
+
void
BasicUI::goto_start ()
{
void
BasicUI::rewind ()
{
- std::cerr << "request transport speed of " << session->transport_speed() - 1.5 << std::endl;
session->request_transport_speed (session->transport_speed() - 1.5);
}
void
BasicUI::prev_marker ()
{
- Location *location = session->locations()->first_location_before (session->transport_frame());
+ framepos_t pos = session->locations()->first_mark_before (session->transport_frame());
- if (location) {
- session->request_locate (location->start(), session->transport_rolling());
+ if (pos >= 0) {
+ session->request_locate (pos, session->transport_rolling());
} else {
session->goto_start ();
}
void
BasicUI::next_marker ()
{
- Location *location = session->locations()->first_location_after (session->transport_frame());
+ framepos_t pos = session->locations()->first_mark_after (session->transport_frame());
- if (location) {
- session->request_locate (location->start(), session->transport_rolling());
+ if (pos >= 0) {
+ session->request_locate (pos, session->transport_rolling());
} else {
- session->request_locate (session->current_end_frame());
+ session->goto_end();
}
}