I have same problem.
I preload effects and one long sound stoped after few seconds…
can you give me some suggestions??
these error messages are occure when the sound stoped…
I use recent version of cocos2d-x
I test on example “Cocos2dxSimpleGame” linked in this site, and same thing…
I changed “pew-pew-lei.wav” file to other long sound and the sound stopped.
pew-pew-lei.wav’s duration is 1 sechond. and changed one is 12 secondes…
test device is galaxy tab.
Does somebody have a trick to be sure that the sounds will be played ? And when they are played, to be sure that they will be played completely ? (not only few seconds…) II tested wav, caf, mp3: some of them works, some other do not work… I use SDK .10 and NDK r7b.
cocos2d-x use SoundPool.
And soundpool has limitation of file bytes, 1048576 is limit.
When soundpool play ogg, mp3 format files, soundpool streams and uncompress files.
And uncompressed byte can’t over 1048576.
i’m facing with this problem as well, i both tried mp3 and ogg, my audio file shd b 10seconds long, but it’s played only 3-4 secs, even i preloaded it before playing it
Anyone please suggest me ideas to solve this problem please
Hi all, I am facing same issues. Has anybody got the solution for this issue.
Though I can play a .mp3 file by calling preloadEffect* early before callingplayEffect()*, myy file is 20 seconds long and it is only played for 14-15 seconds.
I think you can try the OpenSL version build.
>
Here is the reference URL : http://www.cocos2d-x.org/news/65
>
I am without luck to get it worked on my hTC, maybe you will.
hi Simon,
isn’t the OpenSL supposed to use with only the i9100?
i am using the galaxy tab 10.1 and 7.7 have same problem.
May be some effect is to large?
The effect is 80 to 150 kb.
Some effect can play done, and some effect can’t to play last 2-3 second.
I temporarily solved my problem by converting .mp3(I was using it previously) to .ogg file. If that is also not working one needs to low-down the bit rate of audio to 24kbps. This obviously will affect the audio quality but I had not other way.
The developers the library should provide an option as playBackgroundEffect is working. I know background is using MediaPlayer and playEffect is using SoundPool.