Skip to content

Commit 96ba10a

Browse files
committed
sounddevice gives sound, but very distorted
1 parent 2ad89ac commit 96ba10a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mediadecoder/soundrenderers/sounddevicerenderer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ def __init__(self, audioformat, queue=None):
3232
self.stream = sd.OutputStream(
3333
channels = audioformat["nchannels"],
3434
samplerate = audioformat["fps"],
35-
blocksize = 0,
35+
blocksize = audioformat["buffersize"]*2,
3636
callback = self.get_frame
3737
)
3838
self.keep_listening = True
3939

4040
def get_frame(self, outdata, frames, timedata, status):
41-
""" Callback function for the pyaudio stream. Don't use directly. """
41+
""" Callback function for the audio stream. Don't use directly. """
4242
try:
4343
chunk = self.queue.get_nowait()
4444
outdata[:] = chunk

0 commit comments

Comments
 (0)