Hello!
Idk how I should show my code so I will just explain it for now:
I'm making a program where you can search for and play sounds. I use playsound and threads until now. But I wanted to add an option to stop sounds. For that I switch to playsound3 because than I can use .is_alive() and .stop() to accomplish my goal (first pic).
Whole structure:
- a thread is started with a variable containing filepaths
2.the filepaths are separated into their own "sub"threads and added to a list -> in a for loop they are .start()-ed and .join()-ed so the main thread waits - inside the "sub"threads playsound is called
- once every subthread returned the main thread returns
- in the main loop there is the second pic's code that joins finished main threads
But after this change the code now waits for the main thread to join.
Hope this is understandable.