summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2015-08-20 16:00:34 -0500
committerBen Loftis <ben@harrisonconsoles.com>2015-08-27 10:13:35 -0500
commit43f3c0e0f204e9f53b5a52ac9e910e11e570a651 (patch)
treea2bc6fd0765ab9f3594473e82519056337bdd09f /gtk2_ardour/editor_ops.cc
parentc734f82ff224c6316c20d9c936895fbd35f8e43c (diff)
clean-up previous commit
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc45
1 files changed, 22 insertions, 23 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 52ef86771a..f0940fe719 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -6294,14 +6294,15 @@ Editor::set_punch_start_from_edit_point ()
{
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 {
@@ -6324,16 +6325,16 @@ Editor::set_punch_start_from_edit_point ()
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();
@@ -6344,7 +6345,6 @@ printf("set punch end\n");
//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"));
}
@@ -6353,17 +6353,17 @@ printf("set punch %d, %d\n", start, end);
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 {
@@ -6377,8 +6377,7 @@ printf("set loop start\n");
if ( start > end ) {
end = max_framepos;
}
-
-printf("set loop %d, %d\n", start, end);
+
set_loop_range (start, end, _("set loop start from EP"));
}
@@ -6389,13 +6388,14 @@ Editor::set_loop_end_from_edit_point ()
{
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();
@@ -6407,7 +6407,6 @@ Editor::set_loop_end_from_edit_point ()
snap_to(end);
set_loop_range (start, end, _("set loop end from EP"));
-
}
}