Music handling class.
This class stores and plays music. Music is very similar to sound effects, but only one music file can be played at a time, and it is more efficient for larger files than sge.Sound.
What music formats are supported depends on the implementation of the SGE, but Ogg Vorbis is generally a good choice. See the implementation-specific information for a full list of supported formats.
Note
You should avoid the temptation to use MP3 files; MP3 is a patent-encumbered format, so many systems do not support it and royalties to the patent holders may be required for commercial use. There are many programs which can convert your MP3 files to the free Ogg Vorbis format.
The volume of the music in percent from 0 to 100 (0 for no sound, 100 for maximum volume).
The file name of the music given when it was created. (Read-only)
The unique identifier of the music. (Read-only)
The length of the music in milliseconds. (Read-only)
Whether or not the music is playing. (Read-only)
The current position (time) playback of the music is at in milliseconds. (Read-only)
Constructor method.
Arguments:
All other arguments set the respective initial attributes of the music. See the documentation for sge.Music for more information.
Play the music.
Arguments:
See the documentation for sge.Sound.play() for more information.
Queue the music for playback.
This will cause the music to be added to a list of music to play in order, after the previous music has finished playing.
See the documentation for sge.Music.play() for more information.
Destroy the music.
Stop the currently playing music.
See the documentation for sge.Sound.stop() for more information.
Pause playback of the currently playing music.
Resume playback of the currently playing music if paused.
Clear the music queue.