summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-01-20 11:07:27 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2020-01-20 11:07:27 -0700
commitad82b443f47a6ee458b2dbb11deed6422a227b04 (patch)
treedcbf5d7d7f75296382024d31541787b85bb04a38 /libs
parent120be1576a02bd1431d345d4581e20e2301fc7d6 (diff)
fix API and use of Session::force_locate()
Because of the addition of LocateTransportDisposition, this call was unconditionally forcing a roll during startup
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/session.h2
-rw-r--r--libs/ardour/session_state.cc2
-rw-r--r--libs/ardour/session_transport.cc7
3 files changed, 6 insertions, 5 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 5ce59bc174..9969e35c5f 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -1686,7 +1686,7 @@ private:
void flush_all_inserts ();
int micro_locate (samplecnt_t distance);
- void force_locate (samplepos_t sample, bool with_roll = false);
+ void force_locate (samplepos_t sample, LocateTransportDisposition);
void set_transport_speed (double speed, samplepos_t destination_sample, bool abort = false, bool clear_state = false, bool as_default = false);
void realtime_stop (bool abort, bool clear_state);
void realtime_locate (bool);
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 430e0f95ef..9986aa2752 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -436,7 +436,7 @@ Session::session_loaded ()
/* Now, finally, we can fill the playback buffers */
BootMessage (_("Filling playback buffers"));
- force_locate (_transport_sample, false);
+ force_locate (_transport_sample, MustStop);
}
string
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 2b630aa939..da6655a696 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -946,10 +946,11 @@ Session::request_locate (samplepos_t target_sample, LocateTransportDisposition l
}
void
-Session::force_locate (samplepos_t target_sample, bool with_roll)
+Session::force_locate (samplepos_t target_sample, LocateTransportDisposition ltd)
{
- SessionEvent *ev = new SessionEvent (with_roll ? SessionEvent::LocateRoll : SessionEvent::Locate, SessionEvent::Add, SessionEvent::Immediate, target_sample, 0, true);
- DEBUG_TRACE (DEBUG::Transport, string_compose ("Request forced locate to %1\n", target_sample));
+ SessionEvent *ev = new SessionEvent (SessionEvent::Locate, SessionEvent::Add, SessionEvent::Immediate, target_sample, 0, true);
+ ev->locate_transport_disposition = ltd;
+ DEBUG_TRACE (DEBUG::Transport, string_compose ("Request forced locate to %1 roll %2\n", target_sample, enum_2_string (ltd)));
queue_event (ev);
}