Reputation: 767
I am trying to make a program and have the pokemon theme in the background while tkinter is running. But the program doesnt start before the song is over. How can I make that python keeps winsound active while running the rest of the program.'
winsound.PlaySound('song.wav', winsound.SND_ALIAS)
This is what I have. After this the code the whole program starts.
Upvotes: 0
Views: 6034
Reputation: 2351
Use winsound.SND_ASYNC
to make the call return immediatly:
winsound.PlaySound('song.wav', winsound.SND_ALIAS | winsound.SND_ASYNC)
Upvotes: 3