kill audio thread is main thread is gone
This commit is contained in:
parent
4720eb816c
commit
fdedffdafa
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ class AudioProcess:
|
||||||
def process(self):
|
def process(self):
|
||||||
self.a_source.start_stream()
|
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)
|
time.sleep(0.1)
|
||||||
|
|
||||||
self.a_source.stop_stream()
|
self.a_source.stop_stream()
|
||||||
|
|
Loading…
Reference in a new issue