#!/usr/bin/python
############
# Load_Sound.py 
# This is a function that can be 
# used to load a sound using Pygame 
############ 

import os, sys
import pygame
from pygame.locals import *

def load_sound(name):
	class NoneSound:
		def play(self): pass
	if not pygame.mixer:
		return NoneSound()
	fullname=os.path.join('data', name)
	try:
		sound=pygame.mixer.Sound(fullname)
	except pygame.error, message:
		print 'Cannot load sound:', wav
		raise SystemExit, message
	return sound


