What's the best way to load sound without lag?

My splash screen is currently an sprite that plays for 2 seconds, but at the end of the 2 seconds, it lags for a good 1-2 seconds because of the background music I have. What’s a good way around this?

I tried:

loadStream and loadSound

They seem to be producing the same amount of lag. I am loading up 3 background music files (mp3) and 4 sound effects.

Background01 is 800KB

Background02 is 750KB

Background03 is 900KB

In between the different stages of the game, I need to pause a channel and then resume some of the background music.

Is this happening on a device or the simulator?  If a device Android (and OS version) or iOS?

Generally speaking you are loading 3 very large sounds.  Then if they are stereo and high bit rate (44khz) they take a lot of memory and resources to read in and decode.

This is why there is audio.loadStream() because it only loads in a little bit of the file and starts playing it as soon as possible, but if you’re beating up the file system loading those big files and the CPU can’t decode them fast enough, you will get lags.  Then the entire audio.* library is known to be laggy due to an Android bug that wasn’t fixed until 4.1.  if your in the sim or iOS you won’t see this.

I would consider loading the first one (make sure to use loadStream) and maybe use a timer to delay loading the other two big backgrounds for a couple of seconds.

If you don’t need them to be stereo and 44khz, resample them to mono 11khz and you will have smaller files that will load and decode faster.

Any programs you would recommend for converting the sample to mono? 

Most people use the free utility called Audacity

Is this happening on a device or the simulator?  If a device Android (and OS version) or iOS?

Generally speaking you are loading 3 very large sounds.  Then if they are stereo and high bit rate (44khz) they take a lot of memory and resources to read in and decode.

This is why there is audio.loadStream() because it only loads in a little bit of the file and starts playing it as soon as possible, but if you’re beating up the file system loading those big files and the CPU can’t decode them fast enough, you will get lags.  Then the entire audio.* library is known to be laggy due to an Android bug that wasn’t fixed until 4.1.  if your in the sim or iOS you won’t see this.

I would consider loading the first one (make sure to use loadStream) and maybe use a timer to delay loading the other two big backgrounds for a couple of seconds.

If you don’t need them to be stereo and 44khz, resample them to mono 11khz and you will have smaller files that will load and decode faster.

Any programs you would recommend for converting the sample to mono? 

Most people use the free utility called Audacity