| Solarus quests
    1.6
    Quest maker's reference | 
The musics directory contains all musics files used by the quest. For now, the following formats are recognized:
The SPC format is supported but not recommended because it is slow to decode. Therefore, it is recommended to convert SPC musics to IT musics.
Future releases may support more music formats.
When starting a map, its music is automatically played and will loop to the beginning if it finishes. When you play a music from a script (using sol.audio.play_music()), you can specify the action to do when the music finishes. By default, this action is also to loop the music to the beginning.
However, some musics already have their own loop internal loop. It means that they don't finish (they loop by themselves) so the rules above have no effect on them. Instead, such musics are able to loop to a specific point rather than to the beginning.
LOOPSTART, LOOPEND and LOOPLENGTH. These tags are all optional. They should be set to a number of PCM samples. There will be an internal loop if LOOPSTART is specified. You can then use either LOOPEND or LOOPLENGTH to indicate from where you want the music to loop (by default: from the end of the file). If LOOPEND is specified, the music will loop from position LOOPEND to position LOOPSTART. Otherwise, if LOOPLENGTH is specified, the music will loop from position LOOPSTART + LOOPLENGTH to position LOOPSTART.