Skip to content

Commit f98bcc8

Browse files
committed
Remove property "xrun_delayed_usecs"
This is not needed anymore because it is passed directly to the xrun callback.
1 parent 62bd8e7 commit f98bcc8

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

examples/chatty_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def graph_order():
8989

9090

9191
@client.set_xrun_callback
92-
def xrun():
93-
print("xrun; delay", client.xrun_delayed_usecs, "microseconds")
92+
def xrun(delay):
93+
print("xrun; delay", delay, "microseconds")
9494

9595

9696
print("activating JACK")

jack.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -483,16 +483,6 @@ def last_frame_time(self):
483483
"""
484484
return _lib.jack_last_frame_time(self._ptr)
485485

486-
@property
487-
def xrun_delayed_usecs(self):
488-
"""Delay in microseconds due to the most recent XRUN occurrence.
489-
490-
This probably only makes sense when queried from a callback
491-
defined using :meth:`set_xrun_callback`.
492-
493-
"""
494-
return _lib.jack_get_xrun_delayed_usecs(self._ptr)
495-
496486
@property
497487
def inports(self):
498488
"""A list of audio input :class:`Ports`.
@@ -1260,8 +1250,10 @@ def set_xrun_callback(self, callback):
12601250
User-supplied function that is called whenever an xrun has
12611251
occured. It must have this signature::
12621252
1263-
callback(delayed_usecs:int) -> None
1253+
callback(delayed_usecs:float) -> None
12641254
1255+
The callback argument is the delay in microseconds due to
1256+
the most recent XRUN occurrence.
12651257
The `callback` is supposed to raise :class:`CallbackExit` on
12661258
error.
12671259
@@ -1273,7 +1265,7 @@ def set_xrun_callback(self, callback):
12731265
@self._callback("JackXRunCallback", error=_FAILURE)
12741266
def callback_wrapper(_):
12751267
try:
1276-
callback(self.xrun_delayed_usecs)
1268+
callback(_lib.jack_get_xrun_delayed_usecs(self._ptr))
12771269
except CallbackExit:
12781270
return _FAILURE
12791271
return _SUCCESS

0 commit comments

Comments
 (0)