Hello there.
I'm facing a problem since I started to add sounds to my game.
It's like a micro freeze some times I play a sound, but not allways.
I've seen this thread, but doesn't help me:
I'm playing ogg files, whatever the bitrate I use the problem is still there (and with 96KHz in some devices there is no sound)
I'm using a MotoG as my development phone, and I've seen this.
As suggested there, I'm looping some sound with no volume
Doing this the stutter almost dissapears, but I'm sure there must be a better solution than being allways looping a sound.
I say almost dissapears because once in a while I get a micro stutter. It may be my code (lots of sprites, parallax background with 3 hd layers and many Box2d bodies...) but if I remove all the sounds the game is allways smooth.
What could be happening here?
I'm facing a problem since I started to add sounds to my game.
It's like a micro freeze some times I play a sound, but not allways.
I've seen this thread, but doesn't help me:
I'm playing ogg files, whatever the bitrate I use the problem is still there (and with 96KHz in some devices there is no sound)
I'm using a MotoG as my development phone, and I've seen this.
As suggested there, I'm looping some sound with no volume
B4X:
dumbsound.Repeat2(0)
Doing this the stutter almost dissapears, but I'm sure there must be a better solution than being allways looping a sound.
I say almost dissapears because once in a while I get a micro stutter. It may be my code (lots of sprites, parallax background with 3 hd layers and many Box2d bodies...) but if I remove all the sounds the game is allways smooth.
What could be happening here?