Is there any way to pause music using winsound?

254 Views Asked by At

I was programming a game and want to pause the music at certain positions for dramatic effect. The reason I can't just use

winsound.PlaySound(None, winsound.SND_ALIAS)

is because if I do so when I call the function and try to resume my music, the music start all over again. Is there any way to either pause the music or to save where I listened to so I can resume that position when I replay the music?

If not, what other music playing modules should I use that could complete this?

1

There are 1 best solutions below

0
On BEST ANSWER

Unfortunately, it is not possible with winsound. Looking at the documentation you can see that it has very few and simple features available. On the other hand, simpleaudio with complexaudio plugin seems that it is able to do so.

Reference question on SO: How to pause/resume playback with complexaudio in python?