Skip to content

Commit 092623a

Browse files
committed
DOCS: Remove some redundant information from the README
1 parent c5982a3 commit 092623a

2 files changed

Lines changed: 14 additions & 17 deletions

File tree

‎README.rst‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,7 @@ You can even use regular expressions to search for ports:
164164

165165
If you want, you can also set all kinds of callback functions for your client.
166166
For details see the documentation for the class `jack.Client` and the example
167-
applications in the ``examples/`` directory. The methods
168-
`jack.OwnPort.get_buffer()` and `jack.OwnPort.get_array()` shall only be called
169-
from within the process callback (see `jack.Client.set_process_callback()`).
170-
`jack.OwnMidiPort` has a few additional methods which should only be used in
171-
the process callback. Have a look at the example applications
172-
``examples/midi_*.py`` to see how that works.
167+
applications in the ``examples/`` directory.
173168

174169
Once you are ready to run, you should activate your client:
175170

‎jack.py‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -818,11 +818,6 @@ def set_shutdown_callback(self, callback):
818818
help more complex clients understand what is going on. It
819819
should be called before :meth:`activate`.
820820
821-
.. note:: The `callback` should typically signal another thread
822-
to correctly finish cleanup by calling :meth:`close` (since
823-
:meth:`close` cannot be called directly in the context of the
824-
thread that calls the shutdown callback).
825-
826821
Parameters
827822
----------
828823
callback : callable
@@ -833,15 +828,16 @@ def set_shutdown_callback(self, callback):
833828
834829
The argument `status` is of type :class:`jack.Status`.
835830
836-
.. note:: After server shutdown, the client is *not*
831+
.. note:: The `callback` should typically signal another
832+
thread to correctly finish cleanup by calling
833+
:meth:`close` (since it cannot be called directly in the
834+
context of the thread that calls the shutdown callback).
835+
836+
After server shutdown, the client is *not*
837837
deallocated by JACK, the user (that's you!) is
838838
responsible to properly use :meth:`close` to release
839839
client ressources.
840840
841-
.. warning:: :meth:`close` cannot be safely used inside the
842-
shutdown callback and has to be called outside of the
843-
callback context.
844-
845841
"""
846842
@self._callback("JackInfoShutdownCallback")
847843
def callback_wrapper(code, reason, _):
@@ -1810,6 +1806,9 @@ def get_buffer(self):
18101806
optimization (like "pipelining"). Port buffers have to be
18111807
retrieved in each callback for proper functioning.
18121808
1809+
This method shall only be called from within the process
1810+
callback (see :meth:`Client.set_process_callback`).
1811+
18131812
"""
18141813
blocksize = self._client.blocksize
18151814
return _ffi.buffer(_lib.jack_port_get_buffer(self._ptr, blocksize),
@@ -1821,6 +1820,9 @@ def get_array(self):
18211820
Make sure to ``import numpy`` before calling this, otherwise the
18221821
first call might take a long time.
18231822
1823+
This method shall only be called from within the process
1824+
callback (see :meth:`Client.set_process_callback`).
1825+
18241826
See Also
18251827
--------
18261828
get_buffer
@@ -1838,7 +1840,7 @@ class OwnMidiPort(MidiPort, OwnPort):
18381840
which are themselves derived from :class:`Port`. It has the same
18391841
attributes and methods as :class:`OwnPort`, but :meth:`get_buffer`
18401842
and :meth:`get_array` are disabled. Instead, it has methods for
1841-
sending and receiving MIDI events (to be used from within the
1843+
sending and receiving MIDI events (to be used only from within the
18421844
process callback -- see :meth:`Client.set_process_callback`).
18431845
18441846
This class cannot be instantiated directly (see :class:`Port`).

0 commit comments

Comments
 (0)