Digitale bierlijst

sound.py 354B

123456789101112131415
  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. """