Android Crosswalk Intel XDK Audio potential problem.

Discussion and feedback on Construct 2

Post » Mon Dec 01, 2014 3:22 pm

Hi,

Before I post this in the bugs section of the site, I wanted to enquire if anybody else is currently having this problem as traditionally it didn't exist.

Currently in the latest stable release of Construct 2 (v190) and version 1536 of the Intel XDK, I am unable to get any audio playing within a game.

My experience is that when I include the Audio object in Construct 2 and export via the Android export option to Intel XDK and build via the Android Crosswalk build. The game will only run if I don't use the preload audio files option (Set within Construct 2), and I don't trigger any Audio object related actions in the game. If I do, the game simply quits on my Android device.

I am now testing with the audio template .Capx (Example: Audio Effects) to ensure it wasn't an issue with my game in particular. And I have run into the same issue. When the Audio Object actions are triggered such as 'play' the game quits.

I have tried this with including the various Cordova plugins in the Intel XDK such as 'media', 'audio' even a few others and in different combinations. But I am still unable to get a game to play sound. If I preload the sound files, the game also exits.

I just wanted to know if anybody else is currently experiencing this. As with older Intel XDK versions and Construct 2 versions, there doesn't seem to be an issue. Even as close back as a month ago, with some people reporting in the forums that they could get the sound work in their Android Crosswalk games..

Kind regards,

Adam
B
86
S
31
G
14
Posts: 106
Reputation: 16,565

Post » Mon Dec 01, 2014 4:28 pm

If Crosswalk crashes, you probably want to report it to Intel. (Nothing in the C2 engine should ever be able to crash the browser that runs it.)
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Mon Dec 01, 2014 5:17 pm

Hey Ashley, thank you for your reply. I will be reporting the problem to Intel as well; I thought I'd ask to see if anyone else had experienced this and found a solution.

I had a similar experience when the AdMob Object was officially introduced in a recent patch and the required third party plugin information changed (From the unofficial 'Pro' version of the plugin), after the splash screen the game ended. But this has now been resolved with both updates to C2 and the Intel XDK. So I was optimistically hoping that the answer was me forgetting to select the appropriate plugin.

The game runs fine in their emulator, which implies the code exported by C2 is fine as you suggest. It only crashes on the device. Their debugging facility doesn't flare up any issue though.
B
86
S
31
G
14
Posts: 106
Reputation: 16,565

Post » Wed Dec 03, 2014 12:38 pm

Alternatively if anyone is currently able to get Audio to work on their Android device via the Crosswalk Build with Intel XDK v1536 without the game crashing. I would appreciate it if you could let me know as it may help be identify the problem I am experiencing better. Thank you.
B
86
S
31
G
14
Posts: 106
Reputation: 16,565

Post » Wed Dec 03, 2014 2:22 pm

Hey @Andeming, I'm running C2 r190 and IntelXDK 1536 and have had no issues with audio when exporting via crosswalk.

For info, the only plugin used is AdMob and I didn't bother to use the preload action. Just play (loop) and I have a mute/unmute option for the audio in my game. No issues here.
ImageImage
Mr. Green - Platform/puzzle game out now!
B
25
S
7
G
1
Posts: 222
Reputation: 3,350

Post » Wed Dec 03, 2014 6:27 pm

Hello @FredQ
I'm also running C2 r190 and IntelXDK 1536, but i'm also having trouble to make my sound working when exporting.
So could you tell me what event you use in your project for the sound ?

Thank you in advance
B
10
S
2
G
1
Posts: 28
Reputation: 681

Post » Wed Dec 03, 2014 6:51 pm

Hey @FredQ,

Thank you for your reply, your confirmation helps to isolate the problem.

I tried a fresh export again using only the plugin you mentioned (admob) for my game. And although I did get an error prompt on my device this time when a sound was programmed to play, it again closed afterwards.

Interestingly, when I play an audio action using a file from the music folder, no sound plays but there is no crash. But if it's a file from the sound folder the game exits.

Thank you again for your time.

Hey @Momo what happens when you try to play audio events? Does your game crash/exit, or is there simply no sound? I think FredQ used the 'play' action and the 'mute' action.

I'm going to play around with this as I have a few more ideas, I'll let you know if I manage to get it to work and how.
B
86
S
31
G
14
Posts: 106
Reputation: 16,565

Post » Wed Dec 03, 2014 7:09 pm

Hey @Andeming

I have one sound effect in the sound folder and one song in the music folder. The two are .ogg files
I'm also using the preload sounds option.
I play my song at start of layout and play my sound effect "on player jump"
I have also a button to mute, unmute all sound.
My game is working great but there is no sound at all.
B
10
S
2
G
1
Posts: 28
Reputation: 681

Post » Wed Dec 03, 2014 7:19 pm

Hey guys, read this, maybe it's connected to your problem?
https://www.scirra.com/forum/chrome-and-crosswalk-app-crash-if-loading-ogg-sounds_t117212

Are you importing a wav file in order for it to output both the m4a and the ogg files?

Mine is simple, I just use:

Event: "On start of layout"
- Sub Event: Audio is any playing (Inverted) > Action: "Play" and select my audio file.

That's it.
ImageImage
Mr. Green - Platform/puzzle game out now!
B
25
S
7
G
1
Posts: 222
Reputation: 3,350

Post » Thu Dec 04, 2014 11:23 am

Okay, i found the solution to my problem.
I had an error while importing wav file, that it couldn't output the m4a file, do i had only the ogg file.
I fixed that error and now i have both m4a and ogg files in my project !
And the sound is working but i can't mute it. I need to find a solution for that.
B
10
S
2
G
1
Posts: 28
Reputation: 681

Next

Return to Construct 2 General

Who is online

Users browsing this forum: lukewasthefish, Phacanu and 6 guests