File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed
mediadecoder/soundrenderers Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ Sound renderers
3333~~~~~~~~~~~~~~~
3434
3535This module contains objects that handle the audio frames supplied by Decoder.
36- At the moment, the only one that is stable is the PyAudioSoundRenderer.
36+ At the moment, the only ones that are stable are the PyAudioSoundRenderer and
37+ SounddeviceSoundrenderer (which both are bindings to PortAudio.
3738
3839Pygame
3940^^^^^^
@@ -48,3 +49,10 @@ Pyaudio
4849.. automodule :: mediadecoder.soundrenderers.pyaudiorenderer
4950 :members:
5051 :special-members: __init__
52+
53+ Sounddevice
54+ ^^^^^^^^^^^
55+
56+ .. automodule :: mediadecoder.soundrenderers.sounddevicerenderer
57+ :members:
58+ :special-members: __init__
Original file line number Diff line number Diff line change 1313queue_timeout = 0.01
1414
1515class SoundrendererSounddevice (SoundRenderer ):
16- """ Uses pyaudio to play sound """
16+ """ Uses python-sounddevice to play sound """
1717 def __init__ (self , audioformat , queue = None ):
1818 """Constructor.
1919 Creates a pyaudio sound renderer.
Original file line number Diff line number Diff line change 1-
2- """ This is an alternative implementation of sounddevicerenderer, that doesn't use
3- the callback functionality of sounddevice's OutputStream. The threading is done by
4- python, instead of C (under the hood) by sounddevice. I haven't determined yet
5- which method is better, so I am leaving them both in for now. """
6-
7-
81import threading
92import sounddevice as sd
103import logging
2215queue_timeout = 0.01
2316
2417class SoundrendererSounddevice (threading .Thread , SoundRenderer ):
25- """ Uses pyaudio to play sound """
18+ """ Uses python-sounddevice to play sound.
19+
20+ This is an alternative implementation of sounddevicerenderer, that doesn't use
21+ the callback functionality of sounddevice's OutputStream. The threading is done by
22+ python, instead of C (under the hood) by sounddevice. I haven't determined yet
23+ which method is better, so I am leaving them both in for now. """
24+
2625 def __init__ (self , audioformat , queue = None ):
2726 """Constructor.
2827 Creates a pyaudio sound renderer.
You can’t perform that action at this time.
0 commit comments