Chrome for android audio lag

Bugs will be moved here once resolved.

Post » Thu Jun 19, 2014 2:33 pm

Hi, i did some tests on my 3 android devices, and i'm getting a big audio lag in Chrome for android(35.0.1916.141) and beta version too.
Here's the video of two them performing vs my iPad 2.

Android devices latency:more than 297 milliseconds.
iPad 2 Safari latency: no lag.

Chrome for Android audio latency

Should i report this to Chrome?... maybe my devices are all crap.
297 ms is a big and audible lag that ruins any gameplay, if someone can test this and give me the feedback, i would appreciate.

Edit:I ran the test both on server and wifi local preview, with different audio samples, mono, stereo, file sizes , with different
conditions, all with the same results.
B
36
S
11
G
9
Posts: 399
Reputation: 10,283

Post » Thu Jun 19, 2014 2:43 pm

Music needs a preload trigger for at least 1 second before playing, to have consistent results on mobiles (most Android devices I've tested).

Sound itself WILL lag the first time a sound is played, but subsequent play of the same sound will not lag.

To prevent this lag, I suggest you preload the sounds you need for that stage/level on start of layout.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Thu Jun 19, 2014 2:56 pm

Silverforce wrote:Music needs a preload trigger for at least 1 second before playing, to have consistent results on mobiles (most Android devices I've tested).

Sound itself WILL lag the first time a sound is played, but subsequent play of the same sound will not lag.

To prevent this lag, I suggest you preload the sounds you need for that stage/level on start of layout.


Yes i know , i always preload all the sounds.The answer I would like to know is, do you have any lag in your android devices and chrome for android?Thanks.
B
36
S
11
G
9
Posts: 399
Reputation: 10,283

Post » Thu Jun 19, 2014 3:34 pm

Sound effects? No lag after the first sound is played.

Music, no lag after preloading either.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Thu Jun 19, 2014 7:57 pm

Silverforce wrote:Sound effects? No lag after the first sound is played.

Music, no lag after preloading either.


Ok thanks, i have to test this in a extended set of android devices to figure out what's going on, but it's a little bit weird to have this problem in all android devices.
B
36
S
11
G
9
Posts: 399
Reputation: 10,283

Post » Fri Jun 20, 2014 11:04 am

There's not much latency on my Nexus 5. However some older Android devices have pretty laggy audio support. I think it's system wide - try testing a different (native?) app and see if it's the same. Which devices are you testing exactly and what version of Android are they running?
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Fri Jun 20, 2014 8:48 pm

Ashley wrote:There's not much latency on my Nexus 5. However some older Android devices have pretty laggy audio support. I think it's system wide - try testing a different (native?) app and see if it's the same. Which devices are you testing exactly and what version of Android are they running?


OK @Ashley thanks , next week i will try to test this in a few more android devices, and i will report the entire set results.
B
36
S
11
G
9
Posts: 399
Reputation: 10,283

Post » Sat Jun 21, 2014 4:14 pm

Dont use preload, its broken on iOS and Ashley says its intended.
c2-173-audio-never-preloads-on-ios-7-1-it-did-in-c2-146_t108587

Do what I did right now. Put your music files in sounds folder and you are good to go. Even if someone have extremely crappy internet connection they wont hear jittery playback.
B
22
S
7
Posts: 94
Reputation: 1,783

Post » Sun Jun 22, 2014 11:43 am

PKrawczynski wrote:Put your music files in sounds folder and you are good to go.

You really should not do that. It will cause extremely high memory usage, and sounds are not coded to ever release their memory, so the more music tracks you play, the higher your memory usage goes. A single decompressed track could be 40mb+, so most devices will only have enough free memory to play two or three music tracks.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Tue Jun 24, 2014 10:34 am

Ashley wrote:
PKrawczynski wrote:Put your music files in sounds folder and you are good to go.

You really should not do that. It will cause extremely high memory usage, and sounds are not coded to ever release their memory, so the more music tracks you play, the higher your memory usage goes. A single decompressed track could be 40mb+, so most devices will only have enough free memory to play two or three music tracks.


@Ashley
I'm well aware.
I play only one music track per game, and since preloading is broken on ios thats my only option.
B
22
S
7
Posts: 94
Reputation: 1,783

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests