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