Add TSFM API to immediately stop the transport

This is useful after a freewheel export, where a realtime-stop
is called, but the actual Locate/MustStop event is only processed
later. Once the session switches back to normal processing after
export the transport is still rolling, TSFM schedules a de-click
locate. This may play some remaining audio.

This new API allows to hard stop the transport, without going
via any session-events and process_with_events. It is intended to
be called from the freewheel process-callback in the last export
cycle.
This commit is contained in:
Robin Gareus 2022-05-10 05:47:48 +02:00
parent 2fc43c59c4
commit 445e8c468e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 14 additions and 0 deletions

View File

@ -112,6 +112,8 @@ struct TransportFSM
TransportFSM (TransportAPI& tapi);
void hard_stop ();
void start () {
init ();
}

View File

@ -98,6 +98,18 @@ TransportFSM::init ()
{
}
void
TransportFSM::hard_stop ()
{
_motion_state = Stopped;
_last_locate.target = max_samplepos;
current_roll_after_locate_status = boost::none;
_direction_state = Forwards;
_transport_speed = 0;
_reverse_after_declick = 0;
_butler_state = NotWaitingForButler;
}
void
TransportFSM::process_events ()
{