kill audio thread is main thread is gone

This commit is contained in:
Patrick Moessler 2023-02-24 17:19:08 +01:00
parent 4720eb816c
commit fdedffdafa

View file

@ -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()