Advertisement
182days

Playing Audio

May 10th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. #functions that play sounds (windoze only)
  2. import winsound
  3.  
  4. def start():
  5.     start = "start.wav"
  6.     winsound.PlaySound(start, winsound.SND_FILENAME|winsound.SND_ASYNC)
  7.     print("Welcome to my text adventure, try to solve the puzzles to win!")
  8.     input("Press any key to continue...")
  9.  
  10. def door():
  11.     door = "door.wav"
  12.     winsound.PlaySound(door, winsound.SND_FILENAME|winsound.SND_ASYNC)
  13.  
  14. def cave():
  15.     cave = "cave.wav"
  16.     winsound.PlaySound(cave, winsound.SND_FILENAME|winsound.SND_ASYNC)
  17.  
  18. def shotgun():
  19.     shot = "shotgun.wav"
  20.     winsound.PlaySound(shotgun, winsound.SND_FILENAME|winsound.SND_ASYNC)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement