Skip to content

Commit 5aca3a0

Browse files
committed
Add transport_reposition_struct()
1 parent b56efbc commit 5aca3a0

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

jack.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,12 +749,36 @@ def transport_query_struct(self):
749749
750750
See Also
751751
--------
752-
transport_query
752+
transport_query, transport_reposition_struct
753753
754754
"""
755755
state = _lib.jack_transport_query(self._ptr, self._position)
756756
return state, self._position
757757

758+
def transport_reposition_struct(self, position):
759+
"""Request a new transport position.
760+
761+
May be called at any time by any client. The new position takes
762+
effect in two process cycles. If there are slow-sync clients
763+
and the transport is already rolling, it will enter the
764+
:attr:`STARTING` state and begin invoking their sync callbacks
765+
(see :meth:`set_sync_callback`) until ready. This function is
766+
realtime-safe.
767+
768+
Parameters
769+
----------
770+
position : jack_position_t
771+
Requested new transport position. This is the same
772+
structure as returned by :meth:`transport_query_struct`.
773+
774+
See Also
775+
--------
776+
transport_query_struct, transport_locate
777+
778+
"""
779+
_check(_lib.jack_transport_reposition(self._ptr, position),
780+
"Error re-positioning transport")
781+
758782
def set_freewheel(self, onoff):
759783
"""Start/Stop JACK's "freewheel" mode.
760784

0 commit comments

Comments
 (0)