changeset 232:75033f790e7d

Remove hooks for sound support - we can add them back easily enough later
author Neil Muller <drnlmuller@gmail.com>
date Sat, 12 May 2012 23:37:24 +0200
parents 57981202bfa5
children 6be93c73fd59
files gamelib/constants.py gamelib/main.py
diffstat 2 files changed, 1 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/constants.py	Sat May 12 23:30:45 2012 +0200
+++ b/gamelib/constants.py	Sat May 12 23:37:24 2012 +0200
@@ -7,12 +7,6 @@
 
 WINDOW_ICON = "icons/icon_24.png"
 
-# Sound related (standard options)
-FREQ = 44100
-BITSIZE = -16  # unsigned 16 bit
-CHANNELS = 2
-BUFFER = 1024
-
 # Result codes for UI hints
 (MAJOR_SETBACK, FAILURE, SUCCESS, MAJOR_SUCCESS, GAME_WIN, INFO) = range(6)
 
--- a/gamelib/main.py	Sat May 12 23:30:45 2012 +0200
+++ b/gamelib/main.py	Sat May 12 23:37:24 2012 +0200
@@ -13,16 +13,12 @@
 from gamelib.data import load_image
 from gamelib.mainmenu import MainMenu
 
-from gamelib.constants import (SCREEN, FREQ, BITSIZE, CHANNELS, BUFFER,
-        WINDOW_ICON)
+from gamelib.constants import SCREEN, WINDOW_ICON
 
 
 def parse_args(args):
     parser = optparse.OptionParser()
 
-    parser.add_option('--no-sound', action="store_false", default=True,
-            dest="sound", help="disable sound")
-
     parser.add_option('--load', type="string", default=None,
             dest="load", help="Save game to load")
 
@@ -33,8 +29,6 @@
     opts, args = parse_args(sys.argv)
     pygame.display.init()
     pygame.font.init()
-    if opts.sound:
-        pygame.mixer.init(FREQ, BITSIZE, CHANNELS, BUFFER)
     screen = pygame.display.set_mode(SCREEN)
     pygame.display.set_icon(load_image(WINDOW_ICON))
     engine = Engine(screen)