summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/editor.h1
-rw-r--r--gtk2_ardour/editor_markers.cc27
-rw-r--r--libs/ardour/audioengine.cc7
-rw-r--r--libs/ardour/session_transport.cc2
4 files changed, 30 insertions, 7 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index dd35d36c05..e64ccf461d 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -1205,6 +1205,7 @@ class Editor : public PublicEditor
void marker_menu_select_all_selectables_using_range ();
void marker_menu_separate_regions_using_location ();
void marker_menu_play_from ();
+ void marker_menu_play_range ();
void marker_menu_set_playhead ();
void marker_menu_set_from_playhead ();
void marker_menu_set_from_selection ();
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index 6da479bafe..29b57e449a 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -481,6 +481,7 @@ Editor::build_range_marker_menu ()
items.push_back (MenuElem (_("Locate to Range Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
items.push_back (MenuElem (_("Play from Range Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
+ items.push_back (MenuElem (_("Play Range"), mem_fun(*this, &Editor::marker_menu_play_range)));
items.push_back (MenuElem (_("Loop Range"), mem_fun(*this, &Editor::marker_menu_loop_range)));
items.push_back (MenuElem (_("Set Range Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
items.push_back (MenuElem (_("Set Range from Range Selection"), mem_fun(*this, &Editor::marker_menu_set_from_selection)));
@@ -726,6 +727,32 @@ Editor::marker_menu_set_from_selection ()
}
}
+
+void
+Editor::marker_menu_play_range ()
+{
+ Marker* marker;
+
+ if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
+ fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
+ /*NOTREACHED*/
+ }
+
+ Location* l;
+ bool is_start;
+
+ if ((l = find_location_from_marker (marker, is_start)) != 0) {
+
+ if (l->is_mark()) {
+ session->request_locate (l->start(), true);
+ }
+ else {
+ session->request_bounded_roll (l->start(), l->end());
+
+ }
+ }
+}
+
void
Editor::marker_menu_loop_range ()
{
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index b68235171f..39c5ddcdab 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -167,7 +167,6 @@ AudioEngine::stop (bool forever)
}
-
bool
AudioEngine::get_sync_offset (nframes_t& offset) const
{
@@ -736,8 +735,6 @@ AudioEngine::halted (void *arg)
AudioEngine* ae = static_cast<AudioEngine *> (arg);
ae->_running = false;
- ae->_jack = 0;
-
ae->_buffer_size = 0;
ae->_frame_rate = 0;
@@ -1045,9 +1042,7 @@ AudioEngine::disconnect_from_jack ()
return 0;
}
- if (jack_client_close (_jack)) {
- error << _("cannot shutdown connection to JACK") << endmsg;
- }
+ jack_client_close (_jack);
_buffer_size = 0;
_frame_rate = 0;
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 6bbfaf6812..9452cb3558 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -1150,7 +1150,7 @@ void
Session::request_bounded_roll (nframes_t start, nframes_t end)
{
request_stop ();
- Event *ev = new Event (Event::StopOnce, Event::Replace, Event::Immediate, end, 0.0);
+ Event *ev = new Event (Event::StopOnce, Event::Replace, end, Event::Immediate, 0.0);
queue_event (ev);
request_locate (start, true);
}