Low Latency Audio on PhoneGap

Get help using Construct 2

Post » Wed Apr 04, 2012 12:12 pm

For whoever needs this I posted a tutorial: tutorial on the subject of audio in phonegap.

I hope this will be helpful to somebody.

0plus12012-04-04 12:13:45
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Wed Apr 04, 2012 4:30 pm

I didn't have any of those problems on my HTC Sensation running Android 2.3 - which phones did you have trouble with?
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Wed Apr 04, 2012 4:34 pm

I don't have sound on my Xperia X10i with android 2.35 when an app/game is exported to phonegap, hope your tutorial will fix this =)Wishy2012-04-04 16:35:35
B
22
S
11
G
9
Posts: 133
Reputation: 6,572

Post » Wed Apr 04, 2012 5:46 pm

I did have a lot of problems with high latency audio and phonegap a few builds ago, where the game froze when it couldn't find sound files, but all has been fine for a while.
...except music not shutting off when the app goes into the background, but that may have been fixed in r85, I haven't had time to explore. I'll check how it's working for me in r85 tonight.
Amazon has rejected my apps in the past due to the app not performing 'elegantly', but I was finally approved mid last week, though I had to remove the background music to achieve it (sound effects still embedded and working fine though).AndyWatson2012-04-04 17:47:57
B
31
S
11
G
7
Posts: 197
Reputation: 6,682

Post » Wed Apr 04, 2012 7:49 pm

r85 shuts down the background music and pauses the game when I minimise the app using the home button; most of the time.
If I keep playing and minimising it, it won't catch it after about 10-20 times and the music keeps on playing when the app is backgrounded. When I close the app and restart it's fine again, until I keep playing and minimising 10-20 times again. This is with a Samsung Galaxy S2.
Also, if I let the screen go dim or lock the screen, the music keeps on playing. That's an instant reject on Amazon Appstore.
However, if someone calls the phone, the music stops and the call can be answered. Once the call is killed, the game comes back into the foreground. This is cool!!
...a couple of snaggings, but almost there as far as I can see...
Amazon testers use a number of different devices, so I may submit the version I've built in r85 once I've cleaned it up a bit and see what their verdict is, though I think the screen dim issue will cause a rejection straight away.AndyWatson2012-04-04 20:21:35
B
31
S
11
G
7
Posts: 197
Reputation: 6,682

Post » Thu Apr 05, 2012 9:05 am

@Ashley iPhone and iPad. Also I'm not the only one who has these problems, it's not really your fault, it's phonegap that is a mess in the audio department, it would be so easy to fix this implementing the low latency audio plugin directly into PG. If you read here: http://www.scirra.com/forum/furries_topic49737.html
you'll se that the situation is the same on Android.
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Thu Apr 05, 2012 11:04 am

Sorry, I could have created some confusion here, I'm using the online PhoneGap Build service rather than PhoneGap itself.

I had a whole stack of problems with PhoneGap and Eclipse a few months ago, which is why I ditched it completely and settled on using PhoneGap Build, despite its constraints. If sound can be sorted out with PhoneGap that's great as it also allows tinkering with the manifest and java files to build better in-app ads.AndyWatson2012-04-05 13:39:54
B
31
S
11
G
7
Posts: 197
Reputation: 6,682


Return to How do I....?

Who is online

Users browsing this forum: flemmig, semaso, Skebab, Virpoja and 11 guests