add Session::transport_stopped_or_stopping()

Session::TransportStateChanged notifies about transport stop before the stop is complete (i.e. at the start of the declick).
Various other objects (notably control surfaces) connect to this signal and use it to modify their displayed state.
We need a method that can tell them we are stopped (or stopping) even though we are not "fully" stopped yet. This is
that method
This commit is contained in:
Paul Davis 2019-12-29 18:41:02 -07:00
parent af30a6f001
commit 719c3f1457
3 changed files with 8 additions and 0 deletions

View File

@ -764,6 +764,7 @@ public:
}
double transport_speed() const { return _count_in_samples > 0 ? 0. : _transport_speed; }
bool transport_stopped() const;
bool transport_stopped_or_stopping() const;
bool transport_rolling() const;
bool silent () { return _silent; }

View File

@ -148,6 +148,7 @@ struct TransportFSM
bool locating () const { return _motion_state == WaitingForLocate; }
bool rolling () const { return _motion_state == Rolling; }
bool stopped () const { return _motion_state == Stopped; }
bool stopping () const { return _motion_state == DeclickToStop; }
bool waiting_for_butler() const { return _butler_state == WaitingForButler; }
bool declick_in_progress() const { return _motion_state == DeclickToLocate || _motion_state == DeclickToStop; }

View File

@ -2000,6 +2000,12 @@ Session::transport_stopped() const
return _transport_fsm->stopped();
}
bool
Session::transport_stopped_or_stopping() const
{
return _transport_fsm->stopped() || _transport_fsm->stopping();
}
bool
Session::transport_rolling() const
{