#-----------------------------------------
# The Sounds.py file looks after the playing
# of sounds and music. 
# A simple event based sound player - so that the main game can just call "PlaySound(globals.DumbBush1)"

import pygame

class Sounds:
	
	# All sounds are manually added here - this means the indexes are fixed
	def __init__(self):
		
		pygame.mixer.init()
		
		self.wavs = []
		
		self.wavs.append( pygame.mixer.Sound("../wavs/boingg.wav"))
		self.wavs.append( pygame.mixer.Sound("../wavs/crowddoh.wav"))
		self.wavs.append( pygame.mixer.Sound("../wavs/dunk.wav"))
		self.wavs.append( pygame.mixer.Sound("../wavs/explode.wav"))
		self.wavs.append( pygame.mixer.Sound("../wavs/jounk.wav"))
		self.wavs.append( pygame.mixer.Sound("../wavs/monitorbeep.wav"))
		self.wavs.append( pygame.mixer.Sound("../wavs/polyndr.wav"))
		self.wavs.append( pygame.mixer.Sound("../wavs/rockin.wav"))
		self.wavs.append( pygame.mixer.Sound("../wavs/click1.wav"))

		self.wavs.append( pygame.mixer.Sound("../wavs/voice_policetheworld.wav"))
		self.wavs.append( pygame.mixer.Sound("../wavs/voice_dukkadukka.wav"))
		self.wavs.append( pygame.mixer.Sound("../wavs/voice_onscreen.wav"))

	def Play(self, id, loop):
		self.wavs[id].play(loop)
	
	def Stop(self, id):
		self.wavs[id].stop()
		
	def Volume(self, id, volume):
		self.wavs[id].set_volume(volume)