Cocoon 2.2.0. sound error construct 2


#21

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.


#22

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.

Regards
Andy


#23

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 version.zip (1.3 MB)


#24

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.


#25

The same problem with Canvas +. The sound disappears sounding exactly 256 times (I specifically thought of it). Changing the version to 2.1.0 at compilation alas did not help. With Webview, everything works, but the application behaves incorrectly on older phones (double tap, no sound). There are no lost events with damping and can not be, since the project is super simple (made especially for the test of this problem). In the project, the sound is simply played every 0.5 seconds.

Sorry for my English


#26

it’s already 5 months after release for public, but still not fixed? :disappointed_relieved:


#27

It’s strange because I have no problems with sounds. Either not on 2.2.0 and 2.1.0.
Can you provide a simple test case (Capx file)?

thank you!


#28

having the same issue. I compiled last in Dec 2017 and everything was fine, rigorous testing of my game. I recently (May 2018) made a few minor updates, nothing to do with sound and now when I start the game the audio shuts off after about 2 minutes.

The other thing that I noticed is that it’s not even just silent. I have code that executes when certain audio is Finished. Victory sound. That code never executes. So it seems like there’s some issue with the Audio Object.

Used C2 r259 ->Cordova>CocoonIO>Android>Canvas+

EDIT: also this is related to another bug that existed in the past. That old audio bug would also shut off some audio and other audio would become mangled/distorted - it was strange! The work around was to add an Event that triggered silent audio Every 1 second. So this somehow seems related.

EDIT2: I changed to Cocoon 2.1.0 and the audio problem is fixed! so it’s a problem in 2.2.0


#29

You saved my day!
I had the same problem and switching back to 2.1.0 solved the problem.
So it is obviously a problem with 2.2.0
Thank you!


#30

Done with penetration testing and handling Sound is an internal problem with Cocoon ( only version 2.2.0 ). My lil game works fine with both, except sound is disappearing (around 10 - 60 seconds )
We can only wait until 2.2.1 comes out or use the stable 2.1.0 …

Please don’t igore this bug and face it + additionally inform us.
Thx


#31

So I have just compiled a game using Cocoon v2.2.0. I can confirm this issue is still happening. After about 2 mins of run time the sound FX stop working. The background sound continues to play though? Once I stop the app on my phone and start it again, the sound FX work for around 2 minutes then stop again.
I am compiling with v2.1.0 to test now…


#32

use version 2.1.0 there is no problem


#33

Yes confirmed, sound working fine with 2.1.0