Cocoon 2.2.0. sound error construct 2


Sorry but what’s a test case?

In my case the audio works fine when there’s only music, but when I add audio effects (like click a button or a sound that play every time you touch the screen) it works only for a few minutes. Then the audio (effects and music) disappears and no return.

I have read in the forum another people who has the same issue and I suppose the problem could be in the compilation.


A test case is a capx file where the issue comes up. So that someone from the cocoon devs can check and reproduce your issue.
With just the provided information it’s nearly impossible to say what’s causing your problem.

What I can say so far is, that it works fine in my both game project. Even after some playtime, the sound effects and click sounds are working fine.

Did you import the sound effects into the “sounds” folder and the ambient music in the “music” folder`? There is a diffrence how those files are handled in those folders.
While files in the “music” folder get streamed (no download needed), files in the “sound” folder get to be downloaded first. If you have huge files in the sound folder, this can take a while and lead to not playing the sounds at all.
Also make sure to set “preload sounds” to yes.



Answering your last paragraph, yes, the effect sounds are in “sounds” folder and music in “music” folder. And I have the “preload sounds” property in “yes”.

I have create a new capx which the problem it keeps being. It’s like a flappy bird. If you test it, you will have to be a bit patient xDD because it happens 2-5 minutes after, only if you are playing (and reproducing the sound constantly).

I have add 2 layouts. In first there is no sound, and stops the music (generally here is a “menu theme”), in the second is the “game”, with it’s “game music” example. In top right i put an icon which let you to the first layout. I did it like that because when the audio stops while playing, only stops the effects. Music continues playing. When that happens and you go back, the whole audio disappears, and if you return to the game, never comes back.

I have add the same plugins I have in my original project, and if it can help, my configuration is:

- For export (Cordova):
(Export options) minimize option unmarked
(Cordova options) Hide status bar, Uses media and “Android, any other platform” marked.
Supported OSS: Minimum iOS (8.0+), Minimum Android (5.0.(Lollipop)[Webview])

- For compile (Cocoon):
Settings window:
(Default) Webview engine: Canvas+, Orientation: Portrait, Fullscreen: Yes
(Android) Install Location: Auto

Plugins window:
Plugins installed: Nativeaudio, Native Share API, ADmob Native ADs for Android.

Here is the capx (I hope I have share it well):

Test (1.3 MB)


Hello Andy,

have you check my capx? I don’t wanto to seem impatient, but I want to solve this problem to publish the game.

Thak you.