13
0

Document transport state semantics

This also adds transport_state_rolling() which can be used
from a TransportStateChanged callback.
This commit is contained in:
Robin Gareus 2020-06-12 05:02:06 +02:00
parent e4ccf772f5
commit d33cc4a3dd
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 16 additions and 0 deletions

View File

@ -790,8 +790,18 @@ public:
return 0;
}
double transport_speed() const { return _count_in_samples > 0 ? 0. : _transport_speed; }
/** @return true if the transport state (TFSM) is stopped */
bool transport_stopped() const;
/** @return true if the transport state (TFSM) is stopped or stopping */
bool transport_stopped_or_stopping() const;
/** @return true if the transport state (TFSM) is rolling.
* Note: the transport may not yet move if pre-roll or count-in in ongoing.
*/
bool transport_state_rolling() const;
/** @return true if the the transport is actively (audible) rolling.
* playback speed is not zero, and count-in as well as latency-preroll is complete,
* and _transport_sample changes every process cycle.
*/
bool transport_rolling() const;
bool transport_will_roll_forwards() const;

View File

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