13
0

patches from Stephane Letz for JACK, and Nimal Ratnayake for play range and play region

git-svn-id: svn://localhost/ardour2/trunk@1260 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-01-02 21:25:37 +00:00
parent 8fabcf4f76
commit b5f497c0c9
4 changed files with 30 additions and 7 deletions

View File

@ -1205,6 +1205,7 @@ class Editor : public PublicEditor
void marker_menu_select_all_selectables_using_range (); void marker_menu_select_all_selectables_using_range ();
void marker_menu_separate_regions_using_location (); void marker_menu_separate_regions_using_location ();
void marker_menu_play_from (); void marker_menu_play_from ();
void marker_menu_play_range ();
void marker_menu_set_playhead (); void marker_menu_set_playhead ();
void marker_menu_set_from_playhead (); void marker_menu_set_from_playhead ();
void marker_menu_set_from_selection (); void marker_menu_set_from_selection ();

View File

@ -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 (_("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 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 (_("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 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))); 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 void
Editor::marker_menu_loop_range () Editor::marker_menu_loop_range ()
{ {

View File

@ -167,7 +167,6 @@ AudioEngine::stop (bool forever)
} }
bool bool
AudioEngine::get_sync_offset (nframes_t& offset) const AudioEngine::get_sync_offset (nframes_t& offset) const
{ {
@ -736,8 +735,6 @@ AudioEngine::halted (void *arg)
AudioEngine* ae = static_cast<AudioEngine *> (arg); AudioEngine* ae = static_cast<AudioEngine *> (arg);
ae->_running = false; ae->_running = false;
ae->_jack = 0;
ae->_buffer_size = 0; ae->_buffer_size = 0;
ae->_frame_rate = 0; ae->_frame_rate = 0;
@ -1045,9 +1042,7 @@ AudioEngine::disconnect_from_jack ()
return 0; return 0;
} }
if (jack_client_close (_jack)) { jack_client_close (_jack);
error << _("cannot shutdown connection to JACK") << endmsg;
}
_buffer_size = 0; _buffer_size = 0;
_frame_rate = 0; _frame_rate = 0;

View File

@ -1150,7 +1150,7 @@ void
Session::request_bounded_roll (nframes_t start, nframes_t end) Session::request_bounded_roll (nframes_t start, nframes_t end)
{ {
request_stop (); 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); queue_event (ev);
request_locate (start, true); request_locate (start, true);
} }