Sound component - lag/delay

Hello world!

I’m just working on Rhythm type game and notice a delay between “play_sound” event post and actual sound play. 'm trying ogg and wav, wav have less delay, but it.

How i can very fast start playback? There is any ‘best practices’ for working with sounds in Defold?

And yes, i’m trying ‘OpenAL’ extension and its better. But it can’t run fast on android - dmengine.apk have only default Defold extensions, and building custom APK is too long.

As I recall android has in the past had greater input->audio playback latency compared to for example iOS. What version Android are you testing on? Supposedly they made some improvements to audio latency in 6.0 Marshmallow.

An example of the latency issue in android 4.0.4:

2 Likes

So, changing engine to something else - not helping me a lot? =)
I’m on Android 4.2 & 5.0.

No, won’t help. The problem is the device itself. That’s why music based games are not super popular for mobile. Every game developer excited to make them realizes they are impossible to make well…

2 Likes

Please do not demotivate me :face_with_raised_eyebrow:

1 Like

So, Maybe any ideas how i can calculate lag and start playing sounds early to synchronize with animations?

The latency will be different for every device unfortunately.