Skip to content

Commit 4cdd149

Browse files
committed
Updated port callbacks notes
1 parent 2b37e97 commit 4cdd149

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

‎jack.py‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,18 @@ def set_port_registration_callback(self, callback=None,
11241124
.. note:: This function cannot be called while the client is
11251125
activated (after `activate()` has been called).
11261126
1127+
.. note:: Due to JACK 1 behavior, it is not possible to get
1128+
the pointer to an unregistering JACK Port if it already
1129+
existed before `activate()` was called. This will cause
1130+
the callback not to be called if *only_available* is
1131+
``True``, or called with ``None`` as first argument (see
1132+
below).
1133+
1134+
To avoid this, call `Client.get_ports()` just after
1135+
`activate()`, allowing the module to store pointers to
1136+
already existing ports and always receive a `Port`
1137+
argument for this callback.
1138+
11271139
Parameters
11281140
----------
11291141
callback : callable
@@ -1184,6 +1196,18 @@ def set_port_connect_callback(self, callback=None, only_available=True):
11841196
.. note:: This function cannot be called while the client is
11851197
activated (after `activate()` has been called).
11861198
1199+
.. note:: Due to JACK 1 behavior, it is not possible to get
1200+
the pointer to an unregistering JACK Port if it already
1201+
existed before `activate()` was called. This will cause
1202+
the callback not to be called if *only_available* is
1203+
``True``, or called with ``None`` as first argument (see
1204+
below).
1205+
1206+
To avoid this, call `Client.get_ports()` just after
1207+
`activate()`, allowing the module to store pointers to
1208+
already existing ports and always receive a `Port`
1209+
argument for this callback.
1210+
11871211
Parameters
11881212
----------
11891213
callback : callable

0 commit comments

Comments
 (0)