Probably you have noticed that when you resume your app wrapped with CocoonJS 1.4 on android the bg music plays twice. I finally found the problem and managed to resolve it.
The new CocoonJS audio engine seems to handle itself the onsuspended and onresume conditions, so I had to remove some code lines in c2runtime.js that also handled the same conditions making the bg music duplicate.
To apply this workaround you have to follow these steps.
1) Export your project without minifying your code.
2) Uncompress c2runtime.js and open it with a text editor (I suggest Notepad++)
3) Find the following lines of code
C2AudioInstance.prototype.setSuspended = function (s)
{
switch (this.myapi) {
case API_HTML5:
?if (s)
?{
if (this.isPlaying())
{
this.instanceObject["pause"]();
this.resume_me = true;
}
else
this.resume_me = false;
?}
?else
?{
if (this.resume_me)
this.instanceObject["play"]();
?}
?break;
4) delete everything in the middle of case API_HTML5 and break. It should look like this:
case API_HTML5:
break;
5) Save and put the modded c2runtime.js in your project zipped file
6) Enjoy <img src="smileys/smiley1.gif" border="0" align="middle" />