Construct + Appmobi Sound Issue

Discussion and feedback on Construct 2

Post » Sun Jul 29, 2012 7:10 pm

Hi all,

I developed a game in C2 and generated an android package using appmobi.

During the game there is a background music and sound effects. The problem is that while playing music, when I play a sfx, the music stops.

I read somewhere that there is an issue for multichannel sound in html5, is that true? Please does anyone know a workaround to this problem?


- I exported the project as html5 and imported in appmobi
- I tried Appmobi export with directcanvas in C2 but I cannot make the game even run in the device (Black screen after splash screen)

Thank you all.
Tomas
B
6
S
2
Posts: 14
Reputation: 885

Post » Sun Jul 29, 2012 10:42 pm

As far as I know C2's appmobi still in development stage, where appmobi can only produce one sound at a time. CMIIW but directcanvas is only for iOS not for android. Try cocoonjs export for Android deployment.

Sorry for my bad english
B
17
S
3
G
3
Posts: 109
Reputation: 2,747

Post » Mon Jul 30, 2012 6:45 am

I tried to resolve this issue many times but still I can't figure where the problem is...

Appmobi can play more than a sound, but on android music stops after 4-5 secs or when another sound is triggered.
Checking logcats you can see that bg music on appmobi is not streamed but preloaded on an audiobuffer with a ridicolous size (about 100k) causing all the sound issues you are experiencing.

I tried everything. I checked source code of appmobi containers, tried to change the c2runtime.js generated by c2, and after two days of swearing I found the solution. I switched to phonegap.
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Mon Jul 30, 2012 1:29 pm

Thanks for the responses.

So Knifegrinder, you did not find those problems with phonegapp? I saw somewhere that it had problems with audio too...one of the reasons I decided for appmobi. But if it solved the problem, I will try that for sure.

Tomas
B
6
S
2
Posts: 14
Reputation: 885

Post » Mon Jul 30, 2012 1:46 pm

Well... Phonegap is a strange beast.
I suggest you to work with phonegap 1.7 and compile your apk by yourself through eclipse.
I use this configuration because i found it the best way to test apps on my phone with a good compatibility with c2 code. What you see in your browser is almost what you get on the phone.
1.7.x is currently the best version for c2 projects.
Then, since 1.8 they made some changes. Accelerometer stopped working as intended and now, with 2.0 even audio has some problems.
Please note that playing audio on phonegap will impact heavily on FPS making your game choppy and barely playable.
The only reason to use phonegap is to test your project on a real device with 99% compatibility while waiting for something more performing like cocoonJS or directcanvas.
Personally, I'd never release an official app compiled with phonegap, the gap with native applications is embarassing.Knifegrinder2012-07-30 13:50:18
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Mon Jul 30, 2012 1:53 pm

AppMobi supports polyphonic audio, so this is an odd issue. Are you sure you correctly categorised your music tracks in the music folder and your sound effects in the sound folder?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon Jul 30, 2012 2:22 pm

@Ashley
I'm starting to think that this issue is platform dependent...
My logcats on android when I try to play a file in the music folder with appmobi scream in red about a soundpool buffer overflow.
I wonder why bg tracks on appmobi are played through soundpool API instead of mediaplayer API.
No problems using the same calls to appmobi.player with iOSKnifegrinder2012-07-30 14:22:41
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Mon Jul 30, 2012 8:17 pm

I tried putting music and sound effects in both Music and Sounds folders. But no luck. Always the same problem...
B
6
S
2
Posts: 14
Reputation: 885

Post » Sat Aug 04, 2012 3:34 pm

Hi,

I exported to CocoonJs and tried it with the App Launcher. It rocks! Fast, everything works (no more sound issues), smooth run. Cant wait for the cloud compilation... does anyone knows where are they releasing it?

Cheers!
B
6
S
2
Posts: 14
Reputation: 885

Post » Sat Aug 04, 2012 3:35 pm

Sorry,

I meant "WHEN they will release it"...
B
6
S
2
Posts: 14
Reputation: 885

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests