From a176bbc9d5dd777a380214dcc77909aae4e7d33d Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Mon, 2 Dec 2019 23:50:23 +0100 Subject: DOC: Add autosummary to each API sub-page --- doc/api/checking-hardware.rst | 9 +++++++++ doc/api/convenience-functions.rst | 11 +++++++++++ doc/api/misc.rst | 10 ++++++++++ doc/api/module-defaults.rst | 7 ++++++- doc/api/platform-specific-settings.rst | 7 +++++++ doc/api/raw-streams.rst | 7 +++++++ doc/api/streams.rst | 7 +++++++ doc/conf.py | 1 + sounddevice.py | 12 ++++++------ 9 files changed, 64 insertions(+), 7 deletions(-) diff --git a/doc/api/checking-hardware.rst b/doc/api/checking-hardware.rst index e2e7b7f..6bc37a1 100644 --- a/doc/api/checking-hardware.rst +++ b/doc/api/checking-hardware.rst @@ -3,6 +3,15 @@ Checking Available Hardware .. currentmodule:: sounddevice +.. autosummary:: + :nosignatures: + + query_devices + DeviceList + query_hostapis + check_input_settings + check_output_settings + .. autofunction:: query_devices .. autoclass:: DeviceList diff --git a/doc/api/convenience-functions.rst b/doc/api/convenience-functions.rst index 71c4733..862f244 100644 --- a/doc/api/convenience-functions.rst +++ b/doc/api/convenience-functions.rst @@ -3,6 +3,17 @@ Convenience Functions using NumPy Arrays .. currentmodule:: sounddevice +.. autosummary:: + :nosignatures: + + play + rec + playrec + wait + stop + get_status + get_stream + .. autofunction:: play .. autofunction:: rec diff --git a/doc/api/misc.rst b/doc/api/misc.rst index 532bb41..2fbb093 100644 --- a/doc/api/misc.rst +++ b/doc/api/misc.rst @@ -3,6 +3,16 @@ Miscellaneous .. currentmodule:: sounddevice +.. autosummary:: + :nosignatures: + + sleep + get_portaudio_version + CallbackFlags + CallbackStop + CallbackAbort + PortAudioError + .. autofunction:: sleep .. autofunction:: get_portaudio_version diff --git a/doc/api/module-defaults.rst b/doc/api/module-defaults.rst index fc89c92..17943b1 100644 --- a/doc/api/module-defaults.rst +++ b/doc/api/module-defaults.rst @@ -3,5 +3,10 @@ Module-wide Default Settings .. currentmodule:: sounddevice +.. autosummary:: + :nosignatures: + + default + .. autoclass:: default - :members: \ No newline at end of file + :members: diff --git a/doc/api/platform-specific-settings.rst b/doc/api/platform-specific-settings.rst index 685554d..8eb3376 100644 --- a/doc/api/platform-specific-settings.rst +++ b/doc/api/platform-specific-settings.rst @@ -3,6 +3,13 @@ Platform-specific Settings .. currentmodule:: sounddevice +.. autosummary:: + :nosignatures: + + AsioSettings + CoreAudioSettings + WasapiSettings + .. autoclass:: AsioSettings .. autoclass:: CoreAudioSettings diff --git a/doc/api/raw-streams.rst b/doc/api/raw-streams.rst index f165cb7..af4ffda 100644 --- a/doc/api/raw-streams.rst +++ b/doc/api/raw-streams.rst @@ -3,6 +3,13 @@ Raw Streams .. currentmodule:: sounddevice +.. autosummary:: + :nosignatures: + + RawStream + RawInputStream + RawOutputStream + .. autoclass:: RawStream :members: read, write diff --git a/doc/api/streams.rst b/doc/api/streams.rst index 5fb1a03..8f481e9 100644 --- a/doc/api/streams.rst +++ b/doc/api/streams.rst @@ -3,6 +3,13 @@ Streams using NumPy Arrays .. currentmodule:: sounddevice +.. autosummary:: + :nosignatures: + + Stream + InputStream + OutputStream + .. autoclass:: Stream :members: :undoc-members: diff --git a/doc/conf.py b/doc/conf.py index 3b30fa4..333c49b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -36,6 +36,7 @@ needs_sphinx = '1.3' # for sphinx.ext.napoleon # ones. extensions = [ 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', # support for NumPy-style docstrings diff --git a/sounddevice.py b/sounddevice.py index c0e0257..4868245 100644 --- a/sounddevice.py +++ b/sounddevice.py @@ -1122,7 +1122,7 @@ class RawInputStream(_StreamBase): extra_settings=None, callback=None, finished_callback=None, clip_off=None, dither_off=None, never_drop_input=None, prime_output_buffers_using_stream_callback=None): - """Open a "raw" input stream. + """PortAudio input stream (using buffer objects). This is the same as `InputStream`, except that the *callback* function and :meth:`~RawStream.read` work on plain Python buffer @@ -1206,7 +1206,7 @@ class RawOutputStream(_StreamBase): extra_settings=None, callback=None, finished_callback=None, clip_off=None, dither_off=None, never_drop_input=None, prime_output_buffers_using_stream_callback=None): - """Open a "raw" output stream. + """PortAudio output stream (using buffer objects). This is the same as `OutputStream`, except that the *callback* function and :meth:`~RawStream.write` work on plain Python @@ -1301,7 +1301,7 @@ class RawStream(RawInputStream, RawOutputStream): extra_settings=None, callback=None, finished_callback=None, clip_off=None, dither_off=None, never_drop_input=None, prime_output_buffers_using_stream_callback=None): - """Open a "raw" input/output stream. + """PortAudio input/output stream (using buffer objects). This is the same as `Stream`, except that the *callback* function and `read()`/`write()` work on plain Python buffer @@ -1353,7 +1353,7 @@ class InputStream(RawInputStream): extra_settings=None, callback=None, finished_callback=None, clip_off=None, dither_off=None, never_drop_input=None, prime_output_buffers_using_stream_callback=None): - """Open an input stream. + """PortAudio input stream (using NumPy). This has the same methods and attributes as `Stream`, except :meth:`~Stream.write` and `write_available`. @@ -1426,7 +1426,7 @@ class OutputStream(RawOutputStream): extra_settings=None, callback=None, finished_callback=None, clip_off=None, dither_off=None, never_drop_input=None, prime_output_buffers_using_stream_callback=None): - """Open an output stream. + """PortAudio output stream (using NumPy). This has the same methods and attributes as `Stream`, except :meth:`~Stream.read` and `read_available`. @@ -1508,7 +1508,7 @@ class Stream(InputStream, OutputStream): extra_settings=None, callback=None, finished_callback=None, clip_off=None, dither_off=None, never_drop_input=None, prime_output_buffers_using_stream_callback=None): - """Open a stream for simultaneous input and output. + """PortAudio stream for simultaneous input and output (using NumPy). To open an input-only or output-only stream use `InputStream` or `OutputStream`, respectively. If you want to handle audio data -- cgit v1.2.3