Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jack_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@

/* transport.h */

/* TODO: jack_release_timebase */
int jack_release_timebase(jack_client_t* client);
int jack_set_sync_callback(jack_client_t* client, JackSyncCallback sync_callback, void* arg);
int jack_set_sync_timeout(jack_client_t* client, jack_time_t timeout);
int jack_set_timebase_callback(jack_client_t* client, int conditional, JackTimebaseCallback timebase_callback, void* arg);
Expand Down
28 changes: 28 additions & 0 deletions src/jack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,34 @@ def callback_wrapper(state, pos, _):
self._ptr, callback_wrapper, _ffi.NULL),
'Error setting sync callback')

def release_timebase(self):
"""De-register as timebase master.

Should be called by the current timebase master to release
itself from that responsibility and to stop the callback
registered with `set_timebase_callback()` from being called.

If the timebase master releases the timebase or leaves the JACK
graph for any reason, the JACK engine takes over at the start of
the next process cycle. The transport state does not change. If
rolling, it continues to play, with frame numbers as the only
available position information.

Raises
------
JackError
If the client is not the current timebase master or
releasing the timebase failed for another reason

See Also
--------
set_timebase_callback

"""
_check(
_lib.jack_release_timebase(self._ptr),
'Error releasing timebase')

def set_timebase_callback(self, callback=None, conditional=False):
"""Register as timebase master for the JACK subsystem.

Expand Down