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

        The timebase master registers a callback that updates extended
        position information such as beats or timecode whenever
        necessary.  Without this extended information, there is no need
        for this function.

        There is never more than one master at a time.  When a new
        client takes over, the former callback is no longer called.
        Taking over the timebase may be done conditionally, so that
        `callback` is not registered if there was a master already.

        Parameters
        ----------
        callback : callable
            Realtime function that returns extended position
            information.  Its output affects all of the following process
            cycle.  This realtime function must not wait.
            It is called immediately after the process callback (see
            :meth:`set_process_callback`) in the same thread whenever
            the transport is rolling, or when any client has requested a
            new position in the previous cycle.  The first cycle after
            :meth:`set_timebase_callback()` is also treated as a new
            position, or the first cycle after :meth:`activate()` if the
            client had been inactive.
            The `callback` must have this signature::

                callback(state: int, blocksize: int, pos: jack_position_t, new_pos: bool) -> None

            `state`
                The current transport state.
                See :attr:`transport_state`.
            `blocksize`
                The number of frames in the current period.
                See :attr:`blocksize`.
            `pos`
                The position structure for the next cycle; `pos.frame`
                will be its frame number.  If `new_pos` is ``False``,
                this structure contains extended position information
                from the current cycle.  If `new_pos` is ``True``, it
                contains whatever was set by the requester.
                The `callback`'s task is to update the extended
                information here.  See :meth:`transport_query_struct`
                for details about `jack_position_t`.
            `new_pos`
                ``True`` for a newly requested `pos`, or for the first
                cycle after the timebase callback is defined.

            .. note:: The `pos` argument must not be used to set
               `pos.frame`.  To change position, use
               :meth:`transport_reposition_struct()` or
               :meth:`transport_locate()`.  These functions are
               realtime-safe, the timebase callback can call them
               directly.
        conditional : bool
            Set to ``True`` for a conditional request.

        Returns
        -------
        bool
            ``True`` if the timebase callback was registered.
            ``False`` if a conditional request failed because another
            timebase master is already registered.

        """
        if callback is None:
            return lambda cb: self.set_timebase_callback(cb, conditional)

        @self._callback("JackTimebaseCallback")
        def callback_wrapper(state, blocksize, pos, new_pos, _):
            callback(state, blocksize, pos, bool(new_pos))

        err = _lib.jack_set_timebase_callback(self._ptr, conditional,
                                              callback_wrapper, _ffi.NULL)

        # Because of a bug in JACK2 version <= 1.9.10, we also check for -1.
        # See https://github.com/jackaudio/jack2/pull/123
        if conditional and (_errno.EBUSY, -1) in err:
            return False
        _check(err, "Error setting timebase callback")
        return True
dataset/ETHPy150Open spatialaudio/jackclient-python/jack.py/Client.set_timebase_callback/swapped operands of `in`