Digitale bierlijst

sound.py 492B

123456789101112131415161718
  1. """
  2. Provides functions related to playing sounds.
  3. """
  4. import os
  5. import simpleaudio as sa
  6. SOUNDS_DIR = os.path.join(os.path.dirname(__file__), "sounds")
  7. """ Contains the absolute path to the sounds directory. """
  8. PLOP_WAVE = sa.WaveObject.from_wave_file(os.path.join(SOUNDS_DIR, "plop.wav"))
  9. """ SimpleAudio WaveObject containing the plop sound. """
  10. UNDO_WAVE = sa.WaveObject.from_wave_file(os.path.join(SOUNDS_DIR, "undo.wav"))
  11. """ SimpleAudio WaveObject containing the undo sound. """