Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17076

There is a delay when I try to play effects on Android

$
0
0

@aleksmutlu wrote:

Hi!
I have a problem with playing sound effects on android. In my game player taps rapidly on the screen and after each tap I would like to play an effect. (I am using Cocos2d-x v3.10)

What I do is; On load

this.audioEngine = cc.AudioEngine.getInstance();
this.audioEngine.preloadEffect(res.moveSound);

And I play the effect by using this line;

that.audioEngine.playEffect(res.moveSound, false);

This actually works great on iOS, but on Android there is a bit delay..

My file format is wav, and its duration is less than a second. I know that OGG is a better format for android, but that delay happens again with an ogg file.

I am also playing a background music during the game, but I don't think that should affect anything.

Am I doing something wrong?

Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17076

Trending Articles