fix recording overflow handling

This commit is contained in:
Damien Elmes 2018-12-22 13:41:35 +10:00
parent f91e30a2c1
commit 8e4f5d5032

View File

@ -330,13 +330,7 @@ class PyAudioThreadedRecorder(threading.Thread):
data = b""
while not self.finish:
try:
data += stream.read(chunk)
except IOError as e:
if e[1] == pyaudio.paInputOverflowed:
pass
else:
raise
data += stream.read(chunk, exception_on_overflow=False)
stream.close()
p.terminate()
wf = wave.open(processingSrc, 'wb')