import winsound
winsound.PlaySound('C:/Users/Computador/Music/Action!/som1.wav', winsound.SND_ASYNC)
When I run this script it does not touch the som1.wav
file, but rather the Windows error sound. Why?
import winsound
winsound.PlaySound('C:/Users/Computador/Music/Action!/som1.wav', winsound.SND_ASYNC)
When I run this script it does not touch the som1.wav
file, but rather the Windows error sound. Why?
The problem was in the absence of the SND_NODEFAULT
flag and the directory was wrong.
import winsound
winsound.PlaySound('teste.wav', winsound.SND_FILENAME | winsound.SND_PURGE | winsound.SND_NODEFAULT)
I tested it with mp3 files and it did not work, only with wav