@@ -289,7 +289,7 @@ def __init__(self, name, use_exact_name=False, no_start_server=False,
289289 args .append (_ffi .new ("char[]" , session_id .encode ()))
290290 self ._ptr = _lib .jack_client_open (* args )
291291 self .status = Status (status [0 ])
292- """JACK status. See :class:`Status`."""
292+ """JACK client status. See :class:`Status`."""
293293 if not self ._ptr :
294294 raise JackError (str (self .status ))
295295
@@ -537,7 +537,7 @@ def connect(self, source, destination):
537537 When a connection exists, data written to the source port will
538538 be available to be read at the destination port.
539539
540- The port types must be identical .
540+ Audio ports can obviously not be connected with MIDI ports .
541541
542542 Parameters
543543 ----------
@@ -633,7 +633,7 @@ def set_shutdown_callback(self, callback, userdata=None):
633633 Register a function (and optional argument) to be called if and
634634 when the JACK server shuts down the client thread.
635635 The function must be written as if it were an asynchonrous POSIX
636- signal handler --- use only async-safe functions, and remember
636+ signal handler -- use only async-safe functions, and remember
637637 that it is executed from another thread.
638638 A typical function might set a flag or write to a pipe so that
639639 the rest of the application knows that the JACK client thread
@@ -708,8 +708,8 @@ def set_process_callback(self, callback, userdata=None):
708708 The `callback` must return zero on success (if `callback`
709709 shall be called again for the next audio block) and non-zero
710710 on error (if `callback` shall not be called again).
711- You can use :data:`CALL_AGAIN` and :data:`STOP_CALLING`,
712- respectively.
711+ You can use the module constants :data:`CALL_AGAIN` and
712+ :data:`STOP_CALLING`, respectively.
713713 userdata : anything
714714 This will be passed as second argument whenever `callback`
715715 is called.
@@ -787,8 +787,8 @@ def set_blocksize_callback(self, callback, userdata=None):
787787 callback(blocksize:int, userdata) -> int
788788
789789 The `callback` must return zero on success and non-zero on
790- error. You can use :data:`SUCCESS` and :data:`FAILURE`,
791- respectively.
790+ error. You can use the module constants :data:`jack.SUCCESS`
791+ and :data:`jack.FAILURE`, respectively.
792792
793793 Although this function is called in the JACK process thread,
794794 the normal process cycle is suspended during its operation,
@@ -831,8 +831,8 @@ def set_samplerate_callback(self, callback, userdata=None):
831831
832832 The argument `samplerate` is the new engine sample rate.
833833 The `callback` must return zero on success and non-zero on
834- error. You can use :data:`SUCCESS` and :data:`FAILURE`,
835- respectively.
834+ error. You can use the module constants :data:`jack.SUCCESS`
835+ and :data:`jack.FAILURE`, respectively.
836836 userdata : anything
837837 This will be passed as second argument whenever `callback`
838838 is called.
@@ -991,8 +991,8 @@ def set_port_rename_callback(self, callback, userdata=None):
991991 :class:`OwnMidiPort` object); the second and third argument
992992 is the old and new name, respectively.
993993 The `callback` must return zero on success and non-zero on
994- error. You can use :data:`SUCCESS` and :data:`FAILURE`,
995- respectively.
994+ error. You can use the module constants :data:`jack.SUCCESS`
995+ and :data:`jack.FAILURE`, respectively.
996996 userdata : anything
997997 This will be passed as fourth argument whenever `callback`
998998 is called.
@@ -1031,8 +1031,8 @@ def set_graph_order_callback(self, callback, userdata=None):
10311031 callback(userdata) -> int
10321032
10331033 The `callback` must return zero on success and non-zero on
1034- error. You can use :data:`SUCCESS` and :data:`FAILURE`,
1035- respectively.
1034+ error. You can use the module constants :data:`jack.SUCCESS`
1035+ and :data:`jack.FAILURE`, respectively.
10361036 userdata : anything
10371037 This will be passed as argument whenever `callback` is
10381038 called.
@@ -1068,8 +1068,8 @@ def set_xrun_callback(self, callback, userdata=None):
10681068 callback(userdata) -> int
10691069
10701070 The `callback` must return zero on success and non-zero on
1071- error. You can use :data:`SUCCESS` and :data:`FAILURE`,
1072- respectively.
1071+ error. You can use the module constants :data:`jack.SUCCESS`
1072+ and :data:`jack.FAILURE`, respectively.
10731073 userdata : anything
10741074 This will be passed as argument whenever `callback` is
10751075 called.
@@ -1371,6 +1371,8 @@ class MidiPort(Port):
13711371 This class is derived from :class:`Port` and has exactly the same
13721372 attributes and methods.
13731373
1374+ This class cannot be instantiated directly (see :class:`Port`).
1375+
13741376 New JACK audio/MIDI ports can be created with the
13751377 :meth:`~Ports.register` method of :attr:`Client.inports`,
13761378 :attr:`Client.outports`, :attr:`Client.midi_inports` and
@@ -1393,20 +1395,7 @@ class OwnPort(Port):
13931395 This class is derived from :class:`Port`. :class:`OwnPort` objects
13941396 can do everything that :class:`Port` objects can, plus a lot more.
13951397
1396- This class cannot be instantiated directly. Instead, instances of
1397- this class are returned from :meth:`Client.get_port_by_name`,
1398- :meth:`Client.get_ports`, :meth:`Client.get_all_connections` and
1399- :attr:`connections`.
1400- In addition, instances of this class are available in the callbacks
1401- which are set with :meth:`Client.set_port_registration_callback`,
1402- :meth:`Client.set_port_connect_callback` or
1403- :meth:`Client.set_port_rename_callback`.
1404-
1405- Note, however, that if the used :class:`Client` doesn't own the
1406- respective port, instances of :class:`Port` (instead of
1407- :class:`OwnPort`) will be created.
1408- In case of MIDI ports, instances of :class:`MidiPort` or
1409- :class:`OwnMidiPort` are created.
1398+ This class cannot be instantiated directly (see :class:`Port`).
14101399
14111400 New JACK audio/MIDI ports can be created with the
14121401 :meth:`~Ports.register` method of :attr:`Client.inports`,
@@ -1537,6 +1526,9 @@ def get_buffer(self):
15371526 def get_array (self ):
15381527 """Get audio buffer as NumPy array.
15391528
1529+ Make sure to ``import numpy`` before calling this, otherwise the
1530+ first call might take a long time.
1531+
15401532 See Also
15411533 --------
15421534 get_buffer
@@ -1557,6 +1549,8 @@ class OwnMidiPort(MidiPort, OwnPort):
15571549 sending and receiving MIDI events (to be used from within the
15581550 process callback -- see :meth:`Client.set_process_callback`).
15591551
1552+ This class cannot be instantiated directly (see :class:`Port`).
1553+
15601554 New JACK audio/MIDI ports can be created with the
15611555 :meth:`~Ports.register` method of :attr:`Client.inports`,
15621556 :attr:`Client.outports`, :attr:`Client.midi_inports` and
0 commit comments