Mercurial > rinkhals
diff gamelib/constants.py @ 90:23a8b2e49e9f
Added ability to initialize sound and play sounds, and handle sound not working / file being missing etc
author | David Fraser <davidf@sjsoft.com> |
---|---|
date | Wed, 02 Sep 2009 10:34:22 +0000 |
parents | ad9d1bc7ef0c |
children | 7910b4e01dba |
line wrap: on
line diff
--- a/gamelib/constants.py Wed Sep 02 10:33:35 2009 +0000 +++ b/gamelib/constants.py Wed Sep 02 10:34:22 2009 +0000 @@ -17,6 +17,13 @@ FG_COLOR = (255, 255, 255) BG_COLOR = (0, 0, 0) +# Mixer constants +FREQ = 44100 # same as audio CD +BITSIZE = -16 # unsigned 16 bit +CHANNELS = 2 # 1 == mono, 2 == stereo +BUFFER = 1024 # audio buffer size in no. of samples +FRAMERATE = 30 # how often to check if playback has finished + # Game constants STARTING_CASH = 1000