Music Lua module. Typical usage would be something like:
music.load( "intro" ) -- Load the song music.play() -- Play it
|music.current ()||Gets the name of the current playing song.|
|music.delay (situation, delay)||Delays a rechoose.|
|music.isPlaying ()||Checks to see if something is playing.|
|music.load (name)||Loads a song.|
|music.play ()||Plays the loaded song.|
|music.stop ()||Stops playing the current song.|
- music.current ()
Gets the name of the current playing song.
songname, songplayed = music.current()
Return value:The name of the current playing song or "none" if no song is playing, and the current offset inside the song (0. if music is none).
- music.delay (situation, delay)
Delays a rechoose.
- situation: Situation to choose.
- delay: Delay in seconds.
music.delay( "ambient", 5.0 ) -- Rechooses ambient in 5 seconds
- music.isPlaying ()
Checks to see if something is playing.
Return value:true if something is playing.
- music.load (name)
Loads a song.
- name: Name of the song to load.
- music.play ()
- Plays the loaded song.
- music.stop ()
- Stops playing the current song.