diff --git a/owrx/audio.py b/owrx/audio.py index 35fac28..330b88b 100644 --- a/owrx/audio.py +++ b/owrx/audio.py @@ -247,7 +247,11 @@ class AudioChopper(threading.Thread, metaclass=ABCMeta): for w in self.writers: w.start() while self.doRun: - data = self.source.read(256) + data = None + try: + data = self.source.read(256) + except ValueError: + pass if data is None or (isinstance(data, bytes) and len(data) == 0): self.doRun = False else: