Mercurial > rinkhals
comparison gamelib/sound.py @ 372:90abd39e6c3c 1.0.x
Merge in post-pyweek fixes (r359:371).
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Tue, 13 Oct 2009 20:28:48 +0000 |
parents | 41db9f3ba29e |
children | 03d5cb669298 |
comparison
equal
deleted
inserted
replaced
371:c39e7d33ac82 | 372:90abd39e6c3c |
---|---|
33 CURRENT_MUSIC_FILE = None | 33 CURRENT_MUSIC_FILE = None |
34 | 34 |
35 def stop_background_music(): | 35 def stop_background_music(): |
36 """stops any playing background music""" | 36 """stops any playing background music""" |
37 global CURRENT_MUSIC_FILE | 37 global CURRENT_MUSIC_FILE |
38 if not SOUND_INITIALIZED: | |
39 return | |
38 CURRENT_MUSIC_FILE = None | 40 CURRENT_MUSIC_FILE = None |
39 # TODO: fadeout in a background thread | 41 # TODO: fadeout in a background thread |
40 pygame.mixer.music.stop() | 42 pygame.mixer.music.stop() |
41 | 43 |
42 def background_music(filename): | 44 def background_music(filename): |