{
if (_session) {
- framepos_t start;
- framepos_t end;
+ framepos_t start = 0;
+ framepos_t end = max_framepos;
- //use the existing loop end, if any
+ //use the existing punch end, if any
Location* tpl = transport_punch_location();
- if (tpl)
+ if (tpl) {
end = tpl->end();
-
+ }
+
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
start = _session->audible_frame();
} else {
void
Editor::set_punch_end_from_edit_point ()
{
-printf("set punch end\n");
if (_session) {
- framepos_t start;
- framepos_t end;
+ framepos_t start = 0;
+ framepos_t end = max_framepos;
- //use the existing loop end, if any
+ //use the existing punch start, if any
Location* tpl = transport_punch_location();
- if (tpl)
+ if (tpl) {
start = tpl->start();
+ }
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
end = _session->audible_frame();
//snap the selection start/end
snap_to(end);
-printf("set punch %d, %d\n", start, end);
set_punch_range (start, end, _("set punch end from EP"));
}
void
Editor::set_loop_start_from_edit_point ()
{
-printf("set loop start\n");
if (_session) {
- framepos_t start;
- framepos_t end;
+ framepos_t start = 0;
+ framepos_t end = max_framepos;
//use the existing loop end, if any
Location* tpl = transport_loop_location();
- if (tpl)
+ if (tpl) {
end = tpl->end();
-
+ }
+
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
start = _session->audible_frame();
} else {
if ( start > end ) {
end = max_framepos;
}
-
-printf("set loop %d, %d\n", start, end);
+
set_loop_range (start, end, _("set loop start from EP"));
}
{
if (_session) {
- framepos_t start;
- framepos_t end;
+ framepos_t start = 0;
+ framepos_t end = max_framepos;
- //use the existing loop end, if any
+ //use the existing loop start, if any
Location* tpl = transport_loop_location();
- if (tpl)
+ if (tpl) {
start = tpl->start();
+ }
if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
end = _session->audible_frame();
snap_to(end);
set_loop_range (start, end, _("set loop end from EP"));
-
}
}