How do I fix audio delay for Android?

Get help using Construct 2

Post » Tue Jan 05, 2016 2:08 am

Hey everyone,

Whenever I preview my game on my laptop, the audio works fine. But whenever I run it on my S4, there's a slight delay in the audio. I don't think I did anything wrong in the event sheet. This is one event from my event sheet:

Soccerball | on collision with post ---> Audio | Play 'SFX - soccerball hitting post'
B
7
S
1
Posts: 34
Reputation: 536

Post » Tue Jan 05, 2016 3:20 am

Did you try preloading the sound at the start of the layout?
B
65
S
39
G
24
Posts: 352
Reputation: 18,106

Post » Wed Jan 06, 2016 4:43 pm

ultrafop wrote:Did you try preloading the sound at the start of the layout?


I tried that, unfortunately it didn't work :(
B
7
S
1
Posts: 34
Reputation: 536

Post » Wed Jan 06, 2016 4:47 pm

I should have also mentioned before, I have an iTouch from the 5th gen. There is no audio delay on that device.
B
7
S
1
Posts: 34
Reputation: 536

Post » Fri Jan 08, 2016 6:46 am

That's odd, can you post a link to the capx? I think your rep is too low to post it with a period in there but if you removed the "." in the ".com" maybe I can see what's going on there. That or maybe a screenshot of your event sheet? Either way, please leave your preload audio event in so I can see where you have it.
B
65
S
39
G
24
Posts: 352
Reputation: 18,106

Post » Fri Jan 08, 2016 2:24 pm

ultrafop wrote:That's odd, can you post a link to the capx? I think your rep is too low to post it with a period in there but if you removed the "." in the ".com" maybe I can see what's going on there. That or maybe a screenshot of your event sheet? Either way, please leave your preload audio event in so I can see where you have it.

Here's a screenshot
Image
B
7
S
1
Posts: 34
Reputation: 536

Post » Sat Jan 09, 2016 4:48 am

So I thought I'd look into this further and found this:
sound-stop-playing-after-a-short-break-of-inactivity_t166126

Since it runs fine on the idevice and the PC perhaps there's a connection

My next idea is trying it on other android devices and making sure it isn't something specific to your S4.

Otherwise I honestly feel like I'm grasping at straws. If you're previewing over the network you can try an full export and see if the issue persists. I'd also try moving the preload event to the top of the event sheet, though I'm not sure that would achieve anything. If all else fails, make a bug report and submit the capx.
B
65
S
39
G
24
Posts: 352
Reputation: 18,106

Post » Mon Jan 11, 2016 1:19 am

I moved the preload event to the top of the event sheet and it didn't make a difference. I also previewed my game on an S6 and there's not too much of a delay. I still haven't exported my game yet but I will. Thanks for all your help! :)
B
7
S
1
Posts: 34
Reputation: 536

Post » Sat Jan 23, 2016 5:22 am

I tried moving all the Music files into Sound folder. I am not sure the "side effect" doing this. Maybe someone can explain, if there is any side effect. All background musics play well on my android now. No delay at all.

This is what I do:

1. Make sure the Preload Sounds property is set to Yes.

2. EVENT: System: On start of Layout > Audio: Play <sound name>
No need to use the Preload sound action.

I hope this help :)
B
6
S
1
Posts: 2
Reputation: 304


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, JackTYGA, Kin, worm1 and 17 guests