Looping sound

Hey guys,

Is there a method to loop the background music of a game so that the mp3 file does not stop playing ? 

This is what I am currently using but as soon as the file plays for the 2 min length then it stops and the game is left with n background music. Is there a function to load the soundtrack as a loop ? 

local soundFile = audio.loadSound("soundtrack.mp3") audio.play(soundFile)  

Check out this page… there is a loop option you can pass to play continuously.  Set loop to -1 and it just keeps going.  You will have to stop/unload when appropriate.

I also suggest using the channel parameter to lock the music to a specific channel, just to keep this separated from you other game sounds.

–john

Check out this page… there is a loop option you can pass to play continuously.  Set loop to -1 and it just keeps going.  You will have to stop/unload when appropriate.

I also suggest using the channel parameter to lock the music to a specific channel, just to keep this separated from you other game sounds.

–john