Looping background music

Hi,

I’m testing the suitability of Corona for porting my Mac game to the iDevice. My game has it’s own background music that is played continuously. I have successfully played the music file in Corona but have not seen any way to make the sound file loop. I suppose I could create an event listener to see if the music is still playing an re-play it but I can’t have any delay between the loops and I would rather keep the music resident in memory and not reload it during every loop. Is this possible in Corona? Thanks!

Best Regards,
Rodney [import]uid: 3493 topic_id: 334 reply_id: 300334[/import]

I have the same questions. I did not see any events in documentation that you can listen on (like media.onComplete) [import]uid: 4334 topic_id: 334 reply_id: 529[/import]

same question here too [import]uid: 94309 topic_id: 334 reply_id: 65515[/import]

maybe you need to use http://developer.anscamobile.com/reference/index/audiorewind API [import]uid: 16142 topic_id: 334 reply_id: 65519[/import]

I use:

audio.play( backgroundmusic, { loops=-1 } )

The loops = -1 tells it to loop continuously. [import]uid: 67839 topic_id: 334 reply_id: 65524[/import]

Yes -1 is used in a lot of places not just sounds as a way to loop. Some areas use 0 but if anytime you need something to loop use -1. [import]uid: 33866 topic_id: 334 reply_id: 65536[/import]