Hi people, my name is Artur.
I’ve been developing a game with cocos 2dx for since a long time, and I’ve been using Simple Audio engine on this game until recently, when I decided to change to AudioEngine (I was using cocos2dx 3.15 I’m now using cocos2dx 3.17-2).
The Audio requirements of my game are quite intensive, I would say. It is a racing game, so It has a lot of short sound effects for the bumps and craches, and looping music tracks during gameplay. In addition it has a narration voice and some other sound effects.
Sound effects are small WAV files while music tracks are bigger MP3 ones. The average specs for sound effect files are 360k of 44kHz mono WAV files and for music we have 4MB of 44kHz MP3 files.
We have been built the game for Mac, Windows, IOS and Android.
First of all, I have to say that Simple Audio Engine was doing very well. Except for some glitches on android and windows. For android, we were able to manage workarounds that keep the game very playable. But on Windows we experienced frame drops, that we investigate and confirm that are originated on the sound system.
At first, I ignored those windows problems because that were not a target platform for my game, but now things changed and my company is targeting the windows platform. Since I have beean observing the evolution of AudioEngine I decided to shift to it, in hope to solve the glitches on windows.
I did all the necessary adaptations in my code to use AudioEngine ( and it was very straight forward). Despite some initial problems , like abandoning WAV format I managed to put it to work in All my platforms including windows, and I’m very happy to say that the frame drop problem of windos has gone.
But a new big problem has appeared, and it is happening in all platforms: For some reasion, music tracks (the bigger mp3 files) are not played completly. Any music track stops someware at the middle, and never completes an entire loop. Sometimes music lasts only a few seconds. For the other sound effects everything works fine.
I have noticed that many users have been experiencing similar problems, and it seems that some have managed to fix it by changing the engine internals ( using patches). Mas estas noticias de problemas e soluções em foruns são bastante antigas (2015 to 2016) and than I think it was probably already solved on the engine.
I’m Afraid I’m missing something basic, and I would like to get some help from you people. I’m sorry I can not share all the code with you, but I would say that I’m just using AudioEngine::Play2d() for both sound effects and music. I’m nothing sending an AudioProfile on those calls ( Tryed to send one with max instances =1 for music but didnot solve the problem).
Thanks in advance.