Loop background music seamless like!

Hey everyone,
im adding some background music to my game, i would like to keep the audio files small and have made my music so it loops well, i know how to loop the music in corona, but even with it on loop, it seems there is a delay from when the song ends and starts again… anyone have any ideas or tips on how i could make this more seamless like? otherwise it sounds pretty unprofessional.

thanks [import]uid: 19620 topic_id: 18417 reply_id: 318417[/import]

I would guess that one of two things is happening.

Either the song has silence built into it, or you need a way of precisely measuring the length of the song so the timer for your loop is exact in its length. [import]uid: 10903 topic_id: 18417 reply_id: 70646[/import]

You probably need to trim the silence at the beginning and end of your audio file. Also, compression formats like MP3 may mess up your silence padding because they sometimes inject extra padding. I think this is documented in our Audio Notes page.
[import]uid: 7563 topic_id: 18417 reply_id: 70649[/import]

Oh interesting, i will have to give those ideas a try… what is the preferred audio codec to use in corona? [import]uid: 19620 topic_id: 18417 reply_id: 70660[/import]

The answer is ‘it depends’. The Audio Notes page has info about codecs.
[import]uid: 7563 topic_id: 18417 reply_id: 70662[/import]

Great thanks for your help, turns out my audio file did have a very slight padding on the beginning, cutting that off did the trick, thanks again. [import]uid: 19620 topic_id: 18417 reply_id: 70664[/import]

ewing is right, some sound editors insert silence in the beginning and at the end of an mp3 file. use aif or wav to loop the sound in the editor, then convert either one to mp3
[import]uid: 6459 topic_id: 18417 reply_id: 70699[/import]

Great thanks for the tip, ill make sure to let you know how the end product turns out [import]uid: 19620 topic_id: 18417 reply_id: 70700[/import]