audio_player.py 213 B

12345678910
  1. import winsound
  2. def play(path: str, block_thread: bool = False) -> None:
  3. flag = winsound.SND_FILENAME
  4. if not block_thread:
  5. flag |= winsound.SND_ASYNC
  6. winsound.PlaySound(path, flag)