How can I play a sound asynchronously in a while loop, but don't overlap the sound. Wait for the previous play to finish and only then play it again and so on, until the while loop is running. And of course, the while loop should continue to run while the play is running.
import time
from playsound import playsound
while True:
time.sleep(0.1)
playsound('sound.wav', block=False) # Please suggest another module, "playsound" stopped working and I gave up on fixing it.
print('proof that the while loop is running while the sound is playing')
edit: One more thing, the play should not queue up, once the while loop stops, play must stop as well (only let the one playing play out)