heres my code
import winsound winsound.PlaySound('filename.wav',winsound.SND_LOOP)
i want to play it ONCE not in a loop. i tried removing
SND_LOOP
but it didnt work
i don't have windows os to test it but according to the docs try this :
import winsound winsound.PlaySound('filename.wav',winsound.SND_FILENAME)
Just don't use the winsound.SND_LOOP flag. Use 0 or winsound.SND_ASYNC flag instead.
winsound.SND_LOOP
0
winsound.SND_ASYNC
import winsound winsound.PlaySound('filename.wav',0)
Documentation
Copyright © 2021 Jogjafile Inc.
i don't have windows os to test it but according to the docs try this :