Click sound delay on Android

Get help using Construct 2

Post » Tue May 26, 2015 11:59 am

Hi,

I have very small WAV (2kB or so) file which is triggered to play after user tap the button. For some reason it is delayed about 1 second.

Some sort description of my project:
1. I have "preload sounds" enabled in C2, but it is delayed everytime not only the first time it is triggered.
2. Also tried with preload sound in "On layout start".
3. I'm exporting as Cordova app
4. Then wrapping to APK using Intel XDK to Android Crosswalk
5. In C2 preview (HTML) it works fine, but once it is installed on android device it delays (tested on Samsung Galaxy S4 and Sony Xpreria Z1)

Should I import some plugin in XDK? I'm realy lost here... what am I missing?
ImageImageImage
B
27
S
16
G
80
Posts: 1,013
Reputation: 44,745

Post » Wed May 27, 2015 11:37 am

Over 40 views and no replies. Does this mean that nobody has same problem or nobody knows how to fix it or maybe my post is not clear enough?
ImageImageImage
B
27
S
16
G
80
Posts: 1,013
Reputation: 44,745

Post » Wed May 27, 2015 2:05 pm

I do not have the problem, look at the plugins you have selected in intel XDK new version.
B
157
S
27
G
17
Posts: 912
Reputation: 32,607

Post » Wed May 27, 2015 3:40 pm

Thank you for the reply @Iceangel. Should I include some audio plugin in Intel XDK? At the moment I use only cranberrygame plugin for adMob - nothing else.
ImageImageImage
B
27
S
16
G
80
Posts: 1,013
Reputation: 44,745

Post » Thu May 28, 2015 7:20 am

In theory the plugin Cranberries can cause problems with the sound, screen, etc to interact with advertising.
B
157
S
27
G
17
Posts: 912
Reputation: 32,607

Post » Thu May 28, 2015 5:05 pm

Problem is not in any plugin. I've created completely new blank project to test Audio. What I've added to the project:

1. On tap gesture on: spriteObject -> play sound "Click".

2. On touched: spriteObject2 -> play sound "Click".

3. Every 1 second substact 1 from counter -> if counter == 0 then play sound "Click". (I wanted to test here if TAP event was delaying or play sound)


RESULTS:
a) In C2 preview mode it works good.
b) In Intel XDK emulate mode it works good.
c) In Intel XDK Debug mode (run app via USB on my mobile) sound delays about 0,5s for every above mentioned step 1, 2 and 3.
d) Same delay as above for app installed on mobile with APK.


I have the newest C2 version and newest Intel XDK version. There is absolutely no other plugin involved in this test. It is really hard to believe that only I have this problem because I am not doing anything fancy - everything is out of the box.

Tested on Samsung Galaxy S4, Sony Xperia Z1, and some old LG (I don't know what is it exactly).

Can someone confirm that he is using Audio object with Cordova + Intel XDK and it works fine without any delay? Any clue what can be done? How to debug the problem? I'm out of ideas already.
ImageImageImage
B
27
S
16
G
80
Posts: 1,013
Reputation: 44,745

Post » Thu May 28, 2015 9:48 pm

Small update. It works fine on Samsung Galaxy S6. So it looks like it depends on mobile.
ImageImageImage
B
27
S
16
G
80
Posts: 1,013
Reputation: 44,745

Post » Thu Jun 18, 2015 8:28 am

I have similar problem with Nexus 5 and Nexus 4 - the sound that I play on the start of my app doesn't play on the phone, but works good in preview. All other sounds works good
B
10
S
2
Posts: 71
Reputation: 696

Post » Thu Jun 18, 2015 8:55 am

Long shot try putting the sound in the music folder or the sound folder under files and export.
I had a problem with delay and moved it from the music folder to the sound folder which seemed to fix it.
Not sure why it worked though.
Worth a punt.

P.S. I am using Intel XDK and admob plugin
B
9
S
3
Posts: 146
Reputation: 1,150

Post » Thu Jun 18, 2015 10:41 am

It works fine on Samsung Galaxy S6, Samsung Galaxy 5, Samsung Galaxy Tab, Sony M2, Samsung Galaxy Note 3 . So it looks like it depends on mobile
B
252
S
39
G
15
Posts: 1,964
Reputation: 40,753

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Google [Bot], Phacanu, richcoz81, Txchaser and 29 guests