-1

I was making a game in python and wanted to add sound, so I did so. Wondering if there's a way to play the sound but not pause the rest of my code? (was using winsound)

1 Answers1

1

Use can use winsound.SND_ASYNC to play without stopping the code.
To play:
import winsound
winsound.PlaySound("filename", winsound.SND_ASYNC | winsound.SND_ALIAS )
To stop:
winsound.PlaySound(None, winsound.SND_ASYNC)
Original comment

Cents02
  • 77
  • 1
  • 11