From fdedffdafa40d5c8a8ca0807987539354aed5983 Mon Sep 17 00:00:00 2001 From: Patrick Moessler Date: Fri, 24 Feb 2023 17:19:08 +0100 Subject: [PATCH] kill audio thread is main thread is gone --- util/audio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/audio.py b/util/audio.py index a94c388..4a8b4bb 100644 --- a/util/audio.py +++ b/util/audio.py @@ -45,7 +45,7 @@ class AudioProcess: def process(self): self.a_source.start_stream() - while self.a_source.is_active(): + while self.a_source.is_active() and threading.main_thread().is_alive(): time.sleep(0.1) self.a_source.stop_stream()