I'm using the winsound
library to play a file asynchronously. However, I would like to know when the sound is done playing. If the sound is done, then I keep the flag
set to 1. Otherwise, I set flag
to 0.
This is my current code:
import winsound
winsound.PlaySound('c:\\audiocheck.net_whitenoise.wav',winsound.SND_ALIAS | winsound.SND_ASYNC)
flag = 1
print(flag)