summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-05-12 11:30:12 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2020-05-12 11:34:38 -0600
commit156a31ac4fac4c57bcbb197a5a6b72fcbeb3776f (patch)
tree26461506c5a859333a50ffd2370865e4fb9c8087 /libs/ardour
parentd39ae0ea922f4ada2999ea62c301a3034f9ee1b2 (diff)
remove Session::loop_changing
Since we now (correctly) do not locate for loop changes, this member is unnecessary
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/session.h1
-rw-r--r--libs/ardour/session.cc5
-rw-r--r--libs/ardour/session_transport.cc15
3 files changed, 8 insertions, 13 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index a54166937e..2447b09f99 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -1452,7 +1452,6 @@ private:
*/
pframes_t _pframes_since_last_mtc;
bool play_loop;
- bool loop_changing;
samplepos_t last_loopend;
boost::scoped_ptr<SessionDirectory> _session_dir;
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index eaea8a358e..2b530ba907 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -223,7 +223,6 @@ Session::Session (AudioEngine &eng,
, _send_qf_mtc (false)
, _pframes_since_last_mtc (0)
, play_loop (false)
- , loop_changing (false)
, last_loopend (0)
, _session_dir (new SessionDirectory (fullpath))
, _current_snapshot_name (snapshot_name)
@@ -1517,11 +1516,13 @@ Session::auto_loop_changed (Location* location)
* by loop-changing, and we do not cancel play loop
*/
- loop_changing = true;
request_locate (location->start(), MustRoll);
} else {
+ // schedule a locate-roll to refill the diskstreams at the
+ // previous loop end
+
/* schedule a buffer overwrite to refill buffers with the new loop. */
SessionEvent *ev = new SessionEvent (SessionEvent::OverwriteAll, SessionEvent::Add, SessionEvent::Immediate, 0, 0, 0.0);
ev->overwrite = LoopChanged;
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 01920599da..091d6ddd3b 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -186,18 +186,16 @@ Session::locate (samplepos_t target_sample, bool with_roll, bool with_flush, boo
DEBUG_TRACE (DEBUG::Transport, string_compose ("rt-locate to %1 ts = %7, roll %2 flush %3 for loop end %4 force %5 mmc %6\n",
target_sample, with_roll, with_flush, for_loop_end, force, with_mmc, _transport_sample));
- if (!force && (_transport_sample == target_sample) && !loop_changing && !for_loop_end) {
+ if (!force && (_transport_sample == target_sample) && !for_loop_end) {
- /* already at the desired position. Not forced to locate,
- the loop isn't changing, so unless we're told to
- start rolling also, there's nothing to do but
- tell the world where we are (again).
+ /* already at the desired position. Not forced to locate, so
+ unless we're told to start rolling also, there's nothing to
+ do but tell the world where we are (again).
*/
if (with_roll) {
set_transport_speed (1.0, false, false, false);
}
- loop_changing = false;
TFSM_EVENT (TransportFSM::LocateDone);
Located (); /* EMIT SIGNAL */
return;
@@ -338,7 +336,6 @@ Session::locate (samplepos_t target_sample, bool with_roll, bool with_flush, boo
TFSM_EVENT (TransportFSM::ButlerRequired);
} else {
TFSM_EVENT (TransportFSM::LocateDone);
- loop_changing = false;
}
_send_timecode_update = true;
@@ -692,7 +689,6 @@ Session::butler_completed_transport_work ()
post_locate ();
ptw = PostTransportWork (ptw & ~PostTransportLocate);
set_post_transport_work (ptw);
- loop_changing = false;
TFSM_EVENT (TransportFSM::LocateDone);
}
@@ -1478,7 +1474,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
if (ptw & (PostTransportClearSubstate|PostTransportStop)) {
unset_play_range ();
- if (!loop_changing && !Config->get_loop_is_mode()) {
+ if (!Config->get_loop_is_mode()) {
unset_play_loop ();
}
}
@@ -1598,7 +1594,6 @@ Session::set_play_loop (bool yn, bool change_transport_state)
we do not call unset_play_loop(). This is a
crude mechanism. Got a better idea?
*/
- loop_changing = true;
TFSM_LOCATE (loc->start(), MustRoll, true, false, true);
} else if (!transport_rolling()) {
/* loop-is-mode: not rolling, just locate to loop start */