File tree 3 files changed +17
-10
lines changed
mediadecoder/soundrenderers
3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ Sound renderers
33
33
~~~~~~~~~~~~~~~
34
34
35
35
This 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.
37
38
38
39
Pygame
39
40
^^^^^^
@@ -48,3 +49,10 @@ Pyaudio
48
49
.. automodule :: mediadecoder.soundrenderers.pyaudiorenderer
49
50
:members:
50
51
: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 13
13
queue_timeout = 0.01
14
14
15
15
class SoundrendererSounddevice (SoundRenderer ):
16
- """ Uses pyaudio to play sound """
16
+ """ Uses python-sounddevice to play sound """
17
17
def __init__ (self , audioformat , queue = None ):
18
18
"""Constructor.
19
19
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
-
8
1
import threading
9
2
import sounddevice as sd
10
3
import logging
22
15
queue_timeout = 0.01
23
16
24
17
class 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
+
26
25
def __init__ (self , audioformat , queue = None ):
27
26
"""Constructor.
28
27
Creates a pyaudio sound renderer.
You can’t perform that action at this time.
0 commit comments