Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dschreij committed May 28, 2016
1 parent 0898941 commit 26de274
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
10 changes: 9 additions & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Sound renderers
~~~~~~~~~~~~~~~

This module contains objects that handle the audio frames supplied by Decoder.
At the moment, the only one that is stable is the PyAudioSoundRenderer.
At the moment, the only ones that are stable are the PyAudioSoundRenderer and
SounddeviceSoundrenderer (which both are bindings to PortAudio.

Pygame
^^^^^^
Expand All @@ -48,3 +49,10 @@ Pyaudio
.. automodule:: mediadecoder.soundrenderers.pyaudiorenderer
:members:
:special-members: __init__

Sounddevice
^^^^^^^^^^^

.. automodule:: mediadecoder.soundrenderers.sounddevicerenderer
:members:
:special-members: __init__
2 changes: 1 addition & 1 deletion mediadecoder/soundrenderers/sounddevicerenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
queue_timeout=0.01

class SoundrendererSounddevice(SoundRenderer):
""" Uses pyaudio to play sound """
""" Uses python-sounddevice to play sound """
def __init__(self, audioformat, queue=None):
"""Constructor.
Creates a pyaudio sound renderer.
Expand Down
15 changes: 7 additions & 8 deletions mediadecoder/soundrenderers/sounddevicerenderer2.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@

""" This is an alternative implementation of sounddevicerenderer, that doesn't use
the callback functionality of sounddevice's OutputStream. The threading is done by
python, instead of C (under the hood) by sounddevice. I haven't determined yet
which method is better, so I am leaving them both in for now. """


import threading
import sounddevice as sd
import logging
Expand All @@ -22,7 +15,13 @@
queue_timeout=0.01

class SoundrendererSounddevice(threading.Thread, SoundRenderer):
""" Uses pyaudio to play sound """
""" Uses python-sounddevice to play sound.
This is an alternative implementation of sounddevicerenderer, that doesn't use
the callback functionality of sounddevice's OutputStream. The threading is done by
python, instead of C (under the hood) by sounddevice. I haven't determined yet
which method is better, so I am leaving them both in for now. """

def __init__(self, audioformat, queue=None):
"""Constructor.
Creates a pyaudio sound renderer.
Expand Down

0 comments on commit 26de274

Please sign in to comment.