Useage:
m = Music()
m.Play("intro")
m.Play("bla")
Need a directory ../data/music/intro.ogg
|
Methods
|
|
|
|
|
|
GetFileNames
|
GetFileNames ( self, path=os.path.join( "..", "data", "music" ) )
returns a dict of file names to be used as music. keyed by the file name
without path, and .ogg.
path - to the file names.
|
|
|
Load
|
Load ( self, music_type )
music_type - one of the music types from the sound_config.
|
|
|
Pause
|
Pause ( self )
pauses the music.
|
|
|
Play
|
Play (
self,
music_type,
loop=-1,
)
Starts playing the music.
|
|
|
SetLoudVol
|
SetLoudVol ( self, vol )
louder than max volume. this is for special occasions.
|
|
|
SetMaxVol
|
SetMaxVol ( self, vol )
sets the maximum volume for the music.
|
|
|
Stop
|
Stop ( self )
|
|
|
UnPause
|
UnPause ( self )
|
|
|
Update
|
Update ( self, elapsed_time )
To be called frequently.
|
|
|
__init__
|
__init__ ( self )
|
|
|
music_play_callback
|
music_play_callback ( self )
|
|