fix API and use of Session::force_locate()

Because of the addition of LocateTransportDisposition, this call was unconditionally forcing a roll during startup
This commit is contained in:
Paul Davis 2020-01-20 11:07:27 -07:00
parent 120be1576a
commit ad82b443f4
3 changed files with 6 additions and 5 deletions

View File

@ -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);

View File

@ -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

View File

@ -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);
}