From 3c00048b0c0dbf3efd17cf04fdc7daa91424e338 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 17 Jan 2020 15:26:01 -0700 Subject: Session::request_locate() takes a tri-valued second argument for "roll-after-locate" This allows callers to defer logic about auto-play/current rolling state and more to TransportFSM where it can be cnentralized and is less ambiguous --- libs/surfaces/contourdesign/contourdesign.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/surfaces/contourdesign') diff --git a/libs/surfaces/contourdesign/contourdesign.cc b/libs/surfaces/contourdesign/contourdesign.cc index 1e4471b56b..0ddf9c5945 100644 --- a/libs/surfaces/contourdesign/contourdesign.cc +++ b/libs/surfaces/contourdesign/contourdesign.cc @@ -557,7 +557,7 @@ ContourDesignControlProtocol::prev_marker_keep_rolling () samplepos_t pos = session->locations()->first_mark_before (session->transport_sample()); if (pos >= 0) { - session->request_locate (pos, _keep_rolling && session->transport_rolling()); + session->request_locate (pos, DoTheRightThing); } else { session->goto_start (); } @@ -569,7 +569,7 @@ ContourDesignControlProtocol::next_marker_keep_rolling () samplepos_t pos = session->locations()->first_mark_after (session->transport_sample()); if (pos >= 0) { - session->request_locate (pos, _keep_rolling && session->transport_rolling()); + session->request_locate (pos, DoTheRightThing); } else { session->goto_end(); } @@ -592,7 +592,7 @@ ContourDesignControlProtocol::jog_event_forward () void ContourDesignControlProtocol::jump_forward (JumpDistance dist) { - bool kr = _keep_rolling && session->transport_rolling (); + LocateTransportDisposition kr = _keep_rolling ? DoTheRightThing : MustStop; switch (dist.unit) { case SECONDS: jump_by_seconds (dist.value, kr); break; case BEATS: jump_by_beats (dist.value, kr); break; -- cgit v1.2.3