Weird problem when playing some mp3 files on iOS

Weird problem when playing some mp3 files on iOS
0.0 0


Hi, we are using AudioEngine to play background music in MP3 format and we are having a problem with some files. A weird sound artifact can be heard a second just after the sound start.

The problem can only be heard in iOS, Android is fine.

We tried cutting the mp3 into a smaller file and the artifact disappeared. Also if we use .wav files the artifact disappear.

We are also using cocos2d-x v3.09 but we tested it on v3.12 and the issue persist.

We created a small test project with this sound file so you can test.



Probably more likely to be a problem with the audio file than the audioengine.


Yeah, that’s what we thought, but this is not the only file we are having problems, we will keep testing and we will upload more info here.



Have you tried with another bitrates?


Some more test:

This only happens in AudioEngine, SimpleAudioEngine plays the file in the right way.

We did tried different bit rates.


Hi @lito88
I have similar problem with .mp3 soundtracks and AudioEngine.
I have (rare) audio artifact especially when the game goes in background.
With iOS 8.4 audio was fine, I stared to hear the problem with iOS 9.3.3!


Hi @lito88, @drakon99:

We’ve issues too with MP3 and AudioEngine on iOS.

We’re using a bitrate of 128 kbps.

How do you solve them, please? Is better use SimpleAudioEngine or AudioEngine?

Thanks and best!


Hi all, we didn’t solve it yet :frowning: I guess now that this seems to be a problem the cocos2d team might take a look at this, we also uploaded an example of the sound problem.

it would be nice that if someone find a solution to post it here. We will do it if we found one.



I am having a strange issue related to AudioEngine on iOS. I have implemented Hotline in my game. And when i close the hotline and come back to game then the AudioEngine stops and do not play any sound. Cocos2d-x version is 3.10. Will this get resolved if i upgrade it to 3.13.1 and does it support cocostudio .csb file. And yes all audio files are .mp3.



I have a problem with iOS playing mp3 sounds witn AugioEngine. My cocos2dx version is 3.15.1

I´ve found an issue similar in the changelog, that is supposedly fixed:
“[FIX] AudioEngine: may have noise if playing mp3 files on iOS/Mac OS X”.

The fix date is after this post, so i guess it may refer to this post.

But my problem is that i am experiencing the same issue with 3.15.1. Mp3 sounds with very small pauses in iOS.

Any hint about this?

Thank you a lot!