From 8e4f5d50321d0149159dcb2dfa7c424fd022774f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 22 Dec 2018 13:41:35 +1000 Subject: [PATCH] fix recording overflow handling --- anki/sound.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/anki/sound.py b/anki/sound.py index 6f35d69df..6e1b587ca 100644 --- a/anki/sound.py +++ b/anki/sound.py @@ -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')