SimpleAudio playEffect() issue?

Ro Siade wrote:

Sorry for revive this thread, but did really someone fix this problem?
>
Im using cocos2d-1.0.1-x-0.12.0 and experiment same problem of first time playing dont work.

hav you tried preloading?

Aikq Prapat wrote:

Ro Siade wrote:
> Sorry for revive this thread, but did really someone fix this problem?
>
> Im using cocos2d-1.0.1-x-0.12.0 and experiment same problem of first time playing dont work.
>
hav you tried preloading?

Yea, preloading do most of the magic if you do at the start of the game, but! that is not always the clean solution, specially if you want to avoid put more things on memory.

Preloading is not working for me.
it plays the background music ok… but playeffect sounds are very distorted!… sometimes it skips the first time an effect is played.
im on marmalade… i even tried s3eaudioPlay() works but then background music shuts off!

any help would be appreciated!
thanks

I have a similar problem, when I preload the effect or play everything works fine, but when I press home button appear an error on memory indicating an CCTexture2D error =/

@minggo,hi, i tried to use SimpleAudio to playEffect() on my game. i met a strange problem, when i use playEffect() to play many effect sounds in the same time, it seems the sound was cut down. it only happend on Andoid, and my effect file is mp3.
thanks .

For me, on Android 4.1 Galaxy Note 2 works 2 types of sounds (mp3):

  1. high bitrate (120 kbps), but short sound (to 6 seconds), filesize to 120kb
  2. low bitrate (24 kbps), but longer sound (to 10 seconds) and to 40 kb filesize

Hi. Guys. I have got the same problem. I’m going to play multiple sounds( 15s over). But playEffect method supports only short sounds. Is there any way to play multiple long sounds? Urgent. Thanks.

Erin Mongkey wrote:

Hi. Guys. I have got the same problem. I’m going to play multiple sounds( 15s over). But playEffect method supports only short sounds. Is there any way to play multiple long sounds? Urgent. Thanks.

What I’ve done is just lower the bitrate, for me, the lower bitrate you reduce, the longer sounds are played.
Hope this helps you

@derekha2001 wrote:

just tested the SoundPool limit, FYI:
24kHz, mono, CBR for 20s mp3
12kHz, mono, CBR for 30s mp3

It works ! )

Can some of u maybe helt me with my topic…:slight_smile:

In my situation, i preload effect which is about 50kb mp3 file. The first time it is played, it lags the scene while the sound is played undistorted. After the first time of playing, it never lags again. Strange.

Is android >= 5 ? because I think there is a problem with audios and cocos in the new versions of android.

No. In fact, it’s 4.4.2

I have found that even using preloadEffect() with SimpleAudioEngine does NOT properly cache the sound. If many sounds are played, the preloaded effect might be cut off. I think there is a pool behind SAE.

Hello, then SimpleAudioEngine has some limitations:

  • it has 32 contemporary sounds limit

  • It has the limit of long audio files, to 44Khz, not more than 10 seconds (on android)

I ask you, if, for Cocos2d-x 2.2.6, you have any advice for an alternative library for audio effects

Thanks
Don