mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
remove seamless looping as an option (it's now the only kind of looping we support)
This commit is contained in:
parent
fb2f1aa8e1
commit
a072228de5
6 changed files with 33 additions and 88 deletions
|
|
@ -1754,17 +1754,9 @@ ARDOUR_UI::transport_roll ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!Config->get_loop_is_mode()) {
|
if (!Config->get_loop_is_mode()) {
|
||||||
/* XXX it is not possible to just leave seamless loop and keep
|
/* stop loop playback but keep transport state */
|
||||||
playing at present (nov 4th 2009)
|
|
||||||
*/
|
|
||||||
if (!Config->get_seamless_loop()) {
|
|
||||||
/* stop loop playback and stop rolling */
|
|
||||||
_session->request_play_loop (false, true);
|
|
||||||
} else if (rolling) {
|
|
||||||
/* stop loop playback but keep rolling */
|
|
||||||
_session->request_play_loop (false, false);
|
_session->request_play_loop (false, false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} else if (_session->get_play_range () ) {
|
} else if (_session->get_play_range () ) {
|
||||||
/* stop playing a range if we currently are */
|
/* stop playing a range if we currently are */
|
||||||
|
|
@ -1819,16 +1811,11 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode)
|
||||||
_session->request_play_loop (false, affect_transport);
|
_session->request_play_loop (false, affect_transport);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (Config->get_seamless_loop()) {
|
|
||||||
/* the disk buffers contain copies of the loop - we can't
|
/* the disk buffers contain copies of the loop - we can't
|
||||||
just keep playing, so stop the transport. the user
|
just keep playing, so stop the transport. the user
|
||||||
can restart as they wish.
|
can restart as they wish.
|
||||||
*/
|
*/
|
||||||
affect_transport = true;
|
affect_transport = true;
|
||||||
} else {
|
|
||||||
/* disk buffers are normal, so we can keep playing */
|
|
||||||
affect_transport = false;
|
|
||||||
}
|
|
||||||
_session->request_play_loop (false, affect_transport);
|
_session->request_play_loop (false, affect_transport);
|
||||||
}
|
}
|
||||||
} else if (_session->get_play_range ()) {
|
} else if (_session->get_play_range ()) {
|
||||||
|
|
|
||||||
|
|
@ -3178,19 +3178,6 @@ RCOptionEditor::RCOptionEditor ()
|
||||||
"<b>When disabled</b> the loop button starts playing the loop, but stop then cancels loop playback")));
|
"<b>When disabled</b> the loop button starts playing the loop, but stop then cancels loop playback")));
|
||||||
add_option (_("Transport"), bo);
|
add_option (_("Transport"), bo);
|
||||||
|
|
||||||
bo = new BoolOption (
|
|
||||||
"seamless-loop",
|
|
||||||
_("Do seamless looping (not possible when slaved to MTC, LTC etc)"),
|
|
||||||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_seamless_loop),
|
|
||||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_seamless_loop)
|
|
||||||
);
|
|
||||||
Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
|
|
||||||
string_compose (_("<b>When enabled</b> this will loop by reading ahead and wrapping around at the loop point, "
|
|
||||||
"preventing any need to do a transport locate at the end of the loop\n\n"
|
|
||||||
"<b>When disabled</b> looping is done by locating back to the start of the loop when %1 reaches the end "
|
|
||||||
"which will often cause a small click or delay"), PROGRAM_NAME));
|
|
||||||
add_option (_("Transport"), bo);
|
|
||||||
|
|
||||||
add_option (_("Transport"), new OptionEditorHeading (_("Dropout (xrun) Handling")));
|
add_option (_("Transport"), new OptionEditorHeading (_("Dropout (xrun) Handling")));
|
||||||
bo = new BoolOption (
|
bo = new BoolOption (
|
||||||
"stop-recording-on-xrun",
|
"stop-recording-on-xrun",
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,6 @@ Session::Session (AudioEngine &eng,
|
||||||
, _listen_cnt (0)
|
, _listen_cnt (0)
|
||||||
, _solo_isolated_cnt (0)
|
, _solo_isolated_cnt (0)
|
||||||
, _writable (false)
|
, _writable (false)
|
||||||
, _was_seamless (Config->get_seamless_loop ())
|
|
||||||
, _under_nsm_control (false)
|
, _under_nsm_control (false)
|
||||||
, _xrun_count (0)
|
, _xrun_count (0)
|
||||||
, transport_master_tracking_state (Stopped)
|
, transport_master_tracking_state (Stopped)
|
||||||
|
|
@ -1559,7 +1558,7 @@ Session::set_auto_loop_location (Location* location)
|
||||||
|
|
||||||
location->set_auto_loop (true, this);
|
location->set_auto_loop (true, this);
|
||||||
|
|
||||||
if (Config->get_loop_is_mode() && play_loop && Config->get_seamless_loop()) {
|
if (Config->get_loop_is_mode() && play_loop) {
|
||||||
// set all tracks to use internal looping
|
// set all tracks to use internal looping
|
||||||
boost::shared_ptr<RouteList> rl = routes.reader ();
|
boost::shared_ptr<RouteList> rl = routes.reader ();
|
||||||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||||
|
|
|
||||||
|
|
@ -851,10 +851,9 @@ Session::process_event (SessionEvent* ev)
|
||||||
|
|
||||||
case SessionEvent::AutoLoop:
|
case SessionEvent::AutoLoop:
|
||||||
if (play_loop) {
|
if (play_loop) {
|
||||||
/* roll after locate, do not flush, set "with loop"
|
/* roll after locate, do not flush, set "for loop end" true
|
||||||
true only if we are seamless looping
|
|
||||||
*/
|
*/
|
||||||
TFSM_LOCATE (ev->target_sample, true, false, Config->get_seamless_loop(), false);
|
TFSM_LOCATE (ev->target_sample, true, false, true, false);
|
||||||
}
|
}
|
||||||
remove = false;
|
remove = false;
|
||||||
del = false;
|
del = false;
|
||||||
|
|
|
||||||
|
|
@ -340,14 +340,12 @@ Session::do_locate (samplepos_t target_sample, bool with_roll, bool with_flush,
|
||||||
if (!Config->get_loop_is_mode()) {
|
if (!Config->get_loop_is_mode()) {
|
||||||
set_play_loop (false, _transport_speed);
|
set_play_loop (false, _transport_speed);
|
||||||
} else {
|
} else {
|
||||||
if (Config->get_seamless_loop()) {
|
|
||||||
/* this will make the non_realtime_locate() in the butler
|
/* this will make the non_realtime_locate() in the butler
|
||||||
which then causes seek() in tracks actually do the right
|
which then causes seek() in tracks actually do the right
|
||||||
thing.
|
thing.
|
||||||
*/
|
*/
|
||||||
set_track_loop (false);
|
set_track_loop (false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} else if (_transport_sample == al->start()) {
|
} else if (_transport_sample == al->start()) {
|
||||||
|
|
||||||
|
|
@ -502,10 +500,8 @@ Session::set_transport_speed (double speed, samplepos_t destination_sample, bool
|
||||||
if (location != 0) {
|
if (location != 0) {
|
||||||
if (_transport_sample != location->start()) {
|
if (_transport_sample != location->start()) {
|
||||||
|
|
||||||
if (Config->get_seamless_loop()) {
|
|
||||||
/* force tracks to do their thing */
|
/* force tracks to do their thing */
|
||||||
set_track_loop (true);
|
set_track_loop (true);
|
||||||
}
|
|
||||||
|
|
||||||
/* jump to start and then roll from there */
|
/* jump to start and then roll from there */
|
||||||
|
|
||||||
|
|
@ -864,9 +860,9 @@ Session::set_play_loop (bool yn, double speed)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (yn && Config->get_seamless_loop() && synced_to_engine()) {
|
if (yn && synced_to_engine()) {
|
||||||
warning << string_compose (
|
warning << string_compose (
|
||||||
_("Seamless looping cannot be supported while %1 is using JACK transport.\n"
|
_("Looping cannot be supported while %1 is using JACK transport.\n"
|
||||||
"Recommend changing the configured options"), PROGRAM_NAME)
|
"Recommend changing the configured options"), PROGRAM_NAME)
|
||||||
<< endmsg;
|
<< endmsg;
|
||||||
return;
|
return;
|
||||||
|
|
@ -881,7 +877,6 @@ Session::set_play_loop (bool yn, double speed)
|
||||||
|
|
||||||
unset_play_range ();
|
unset_play_range ();
|
||||||
|
|
||||||
if (Config->get_seamless_loop()) {
|
|
||||||
if (!Config->get_loop_is_mode()) {
|
if (!Config->get_loop_is_mode()) {
|
||||||
/* set all tracks to use internal looping */
|
/* set all tracks to use internal looping */
|
||||||
set_track_loop (true);
|
set_track_loop (true);
|
||||||
|
|
@ -890,10 +885,6 @@ Session::set_play_loop (bool yn, double speed)
|
||||||
* of the loop for the first time
|
* of the loop for the first time
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
/* set all tracks to NOT use internal looping */
|
|
||||||
set_track_loop (false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Put the delick and loop events in into the event list. The declick event will
|
/* Put the delick and loop events in into the event list. The declick event will
|
||||||
cause a de-clicking fade-out just before the end of the loop, and it will also result
|
cause a de-clicking fade-out just before the end of the loop, and it will also result
|
||||||
|
|
@ -1129,6 +1120,7 @@ Session::request_play_loop (bool yn, bool change_transport_roll)
|
||||||
queue_event (ev);
|
queue_event (ev);
|
||||||
|
|
||||||
if (yn) {
|
if (yn) {
|
||||||
|
|
||||||
if (!change_transport_roll) {
|
if (!change_transport_roll) {
|
||||||
if (!transport_rolling()) {
|
if (!transport_rolling()) {
|
||||||
/* we're not changing transport state, but we do want
|
/* we're not changing transport state, but we do want
|
||||||
|
|
@ -1139,7 +1131,7 @@ Session::request_play_loop (bool yn, bool change_transport_roll)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!change_transport_roll && Config->get_seamless_loop() && transport_rolling()) {
|
if (!change_transport_roll && transport_rolling()) {
|
||||||
// request an immediate locate to refresh the tracks
|
// request an immediate locate to refresh the tracks
|
||||||
// after disabling looping
|
// after disabling looping
|
||||||
request_locate (_transport_sample-1, false);
|
request_locate (_transport_sample-1, false);
|
||||||
|
|
@ -1237,7 +1229,7 @@ Session::butler_transport_work ()
|
||||||
|
|
||||||
if (ptw & PostTransportLocate) {
|
if (ptw & PostTransportLocate) {
|
||||||
|
|
||||||
if (get_play_loop() && !Config->get_seamless_loop()) {
|
if (get_play_loop()) {
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::Butler, "flush loop recording fragment to disk\n");
|
DEBUG_TRACE (DEBUG::Butler, "flush loop recording fragment to disk\n");
|
||||||
|
|
||||||
|
|
@ -1383,8 +1375,7 @@ Session::non_realtime_locate ()
|
||||||
*/
|
*/
|
||||||
set_track_loop (false);
|
set_track_loop (false);
|
||||||
|
|
||||||
} else if (loc && Config->get_seamless_loop() &&
|
} else if (loc && ((loc->start() <= _transport_sample) || (loc->end() > _transport_sample))) {
|
||||||
((loc->start() <= _transport_sample) || (loc->end() > _transport_sample))) {
|
|
||||||
|
|
||||||
/* jumping to start of loop. This might have been done before but it is
|
/* jumping to start of loop. This might have been done before but it is
|
||||||
* idempotent and cheap. Doing it here ensures that when we start playback
|
* idempotent and cheap. Doing it here ensures that when we start playback
|
||||||
|
|
@ -1709,13 +1700,9 @@ Session::unset_play_loop ()
|
||||||
play_loop = false;
|
play_loop = false;
|
||||||
clear_events (SessionEvent::AutoLoop);
|
clear_events (SessionEvent::AutoLoop);
|
||||||
set_track_loop (false);
|
set_track_loop (false);
|
||||||
|
|
||||||
|
|
||||||
if (Config->get_seamless_loop()) {
|
|
||||||
/* likely need to flush track buffers: this will locate us to wherever we are */
|
/* likely need to flush track buffers: this will locate us to wherever we are */
|
||||||
add_post_transport_work (PostTransportLocate);
|
add_post_transport_work (PostTransportLocate);
|
||||||
TFSM_EVENT (TransportFSM::ButlerRequired);
|
TFSM_EVENT (TransportFSM::ButlerRequired);
|
||||||
}
|
|
||||||
TransportStateChange (); /* EMIT SIGNAL */
|
TransportStateChange (); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1999,17 +1986,6 @@ Session::sync_source_changed (SyncSource type, samplepos_t pos, pframes_t cycle_
|
||||||
|
|
||||||
boost::shared_ptr<TransportMaster> master = TransportMasterManager::instance().current();
|
boost::shared_ptr<TransportMaster> master = TransportMasterManager::instance().current();
|
||||||
|
|
||||||
/* save value of seamless from before the switch */
|
|
||||||
_was_seamless = Config->get_seamless_loop ();
|
|
||||||
|
|
||||||
if (type == Engine) {
|
|
||||||
/* JACK cannot support seamless looping at present */
|
|
||||||
Config->set_seamless_loop (false);
|
|
||||||
} else {
|
|
||||||
/* reset to whatever the value was before we last switched slaves */
|
|
||||||
Config->set_seamless_loop (_was_seamless);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (master->can_loop()) {
|
if (master->can_loop()) {
|
||||||
request_play_loop (false);
|
request_play_loop (false);
|
||||||
} else if (master->has_loop()) {
|
} else if (master->has_loop()) {
|
||||||
|
|
|
||||||
|
|
@ -238,10 +238,7 @@ BasicUI::transport_play (bool from_last_start)
|
||||||
/* XXX it is not possible to just leave seamless loop and keep
|
/* XXX it is not possible to just leave seamless loop and keep
|
||||||
playing at present (nov 4th 2009)
|
playing at present (nov 4th 2009)
|
||||||
*/
|
*/
|
||||||
if (!Config->get_seamless_loop()) {
|
if (rolling) {
|
||||||
/* stop loop playback and stop rolling */
|
|
||||||
session->request_play_loop (false, true);
|
|
||||||
} else if (rolling) {
|
|
||||||
/* stop loop playback but keep rolling */
|
/* stop loop playback but keep rolling */
|
||||||
session->request_play_loop (false, false);
|
session->request_play_loop (false, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue