Android Crosswalk audo takes a long time to load

Discussion and feedback on Construct 2

Post » Sun Oct 12, 2014 10:15 pm

Hi all,

My app has a large amount of audio and it makes Android incredibly slow to load. 15+ seconds is way too long. I am using crosswalk to export to Android. iOS does not seem to have the problem at all (exporting with phonegap). I am just wondering if this is because of Construct 2 or crosswalk? Is the native C2 audio plugin not optimised to load incredibly fast for Android? Would it be better to use a custom audio plugin for Android?

Thanks for the help!
B
16
S
4
Posts: 69
Reputation: 1,834

Post » Sun Oct 12, 2014 10:25 pm

Turn off 'Preload sounds' in project properties. Android can be pretty slow at decoding audio, and if that option is on, it will decode all sounds in the project before starting.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,625

Post » Wed Oct 15, 2014 5:09 am

@Ashley Thanks for the response!

I have done that, it loads quickly, but then the audio takes a long time to load. Apps which have a lot of audio the app takes a long time to load. Is this due to Construct 2 or Crosswalk? As phonegap does not have much of a lag with iOS?

Is there any way to somehow mitigate this issue?

Thanks
B
16
S
4
Posts: 69
Reputation: 1,834

Post » Wed Oct 15, 2014 5:37 am

decoding audio is mostly always slow the best thing to do is try to use sort loops whenever you can.
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Wed Oct 15, 2014 5:55 am

I just can't understand why on iOS it takes a few seconds to load, but on Android it takes a significantly longer time to load. Other apps from the app store don't have the problem, so I am just wondering if the issue lies with crosswalk or C2.
B
16
S
4
Posts: 69
Reputation: 1,834

Post » Wed Oct 15, 2014 1:10 pm

I think it's a problem with Android, it's just not very fast at decoding audio. IIRC I remember a Chrome engineer saying the Android media APIs weren't great which meant long decode times sometimes.

There's not much you can do other than either preload everything and wait it out, or don't preload on startup and use the 'preload' action to try and get the few most important sounds preloaded in advance of whenever they'll be needed.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,625


Return to Construct 2 General

Who is online

Users browsing this forum: JesusJ and 15 guests