Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#MonthOfCode day 13 - sound
import pygame
from time import sleep
#replace this by some cool sound effect & music !
SFX = 'alrighty.wav'
MUSIC = '4sequence.mp3'
# init pygame ; load n play a sound effect
soundObj = pygame.mixer.Sound('alrighty.wav')
# load n play some background music'4sequence.mp3'), 0.0)
# replace the sleep by whatever your game needs to do
# stopping sound before exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment