I'm trying to work with winsound
in Python 3.
To start the sound I do it like this:
play = lambda: PlaySound('Sound.wav', SND_FILENAME)
play()
This only plays the sound one time, but I want to loop it. Is there a built in function to loop the sound?
The next step: In tkinter I have a button with a command:
button3 = Button(root, text="Stop Alarm", fg="Red", bg="Black", command=stopAlarm)
The given command should stop the already looping sound from playing. This is the function:
def stopAlarm():
#stop the alarm
So in short I want to loop the sound, and be able to stop the sound any idea how I can accomplish this?