Examples
========

* :ref:`spaudioExamples`
* :ref:`sppluginExamples`


.. _spaudioExamples:

:doc:`spaudio</spaudio>`
------------------------

Fullduplex I/O
^^^^^^^^^^^^^^

:download:`iotest.py <../examples/iotest.py>`

.. literalinclude:: ../examples/iotest.py


Read and plot (Python array version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:download:`readplot.py <../examples/readplot.py>`

.. literalinclude:: ../examples/readplot.py


Read and plot (raw data version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:download:`readplotraw.py <../examples/readplotraw.py>`

.. literalinclude:: ../examples/readplotraw.py


Read and plot (Numpy ndarray version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:download:`readndarray.py <../examples/readndarray.py>`

.. literalinclude:: ../examples/readndarray.py


Read and plot (Numpy raw ndarray version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:download:`readrawndarray.py <../examples/readrawndarray.py>`

.. literalinclude:: ../examples/readrawndarray.py


Play a Wav file
^^^^^^^^^^^^^^^

:download:`playfromwav.py <../examples/playfromwav.py>`

.. literalinclude:: ../examples/playfromwav.py


Play a Wav file with callback
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:download:`playfromwavcb.py <../examples/playfromwavcb.py>`

.. literalinclude:: ../examples/playfromwavcb.py


.. _sppluginExamples:

:doc:`spplugin</spplugin>`
--------------------------

Plot an Audio File Contents by Plugin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:download:`plotfilebyplugin.py <../examples/plotfilebyplugin.py>`

.. literalinclude:: ../examples/plotfilebyplugin.py


Read an Audio File by Plugin and Write it
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:download:`writefrombyplugin.py <../examples/writefrombyplugin.py>`

.. literalinclude:: ../examples/writefrombyplugin.py


Convert an Audio File by Plugin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:download:`convbyplugin.py <../examples/convbyplugin.py>`

.. literalinclude:: ../examples/convbyplugin.py
