Skip to content

Commit 3020a0b

Browse files
committed
Add transport_state property
1 parent 5b745f2 commit 3020a0b

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎jack.py‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,20 @@ def transport_stop(self):
676676
"""Stop JACK transport."""
677677
_lib.jack_transport_stop(self._ptr)
678678

679+
@property
680+
def transport_state(self):
681+
"""JACK transport state.
682+
683+
This is one of :attr:`STOPPED`, :attr:`ROLLING`,
684+
:attr:`STARTING`, :attr:`NETSTARTING`.
685+
686+
See Also
687+
--------
688+
transport_query
689+
690+
"""
691+
return TransportState(_lib.jack_transport_query(self._ptr, _ffi.NULL))
692+
679693
def transport_locate(self, frame):
680694
"""Reposition the JACK transport to a new frame number.
681695
@@ -705,6 +719,10 @@ def transport_query(self):
705719
A dictionary containing only the valid fields of the
706720
structure returned by :meth:`transport_query_struct`.
707721
722+
See Also
723+
--------
724+
:attr:`transport_state`
725+
708726
"""
709727
state, pos = self.transport_query_struct()
710728
assert pos.unique_1 == pos.unique_2

0 commit comments

Comments
 (0)