Sign in to follow this  
valueerror

music loop in cocoonjs - the song jumps on the first note on every loop

Recommended Posts

i tried different songs in different file formats (mp3,wav, ogg)  

 music = game.add.audio('theme',1,true);  // key, volume, loop  music.play('',0,1,true);  //marker, position, volume, loop, forceRestart

mp3 is not played at all and with wav or ogg the bug is the same..  i also tried playing the music with

game.sound.play('theme',0.4);

and it jumps too...  (it sounds like a damaged cd but only on the first note - the first 200ms are played twice)

 

all the other sounds (the short ones) don't have this problem..  i have no idea what to do - it seems that the file length is somehow a source of the problem (my audio file is a 30sec loop so it's not that long)

 

thx in advance!

Share this post


Link to post
Share on other sites

so after an hour of testing i could pinpoint the problem:   

 

cocoonjs doubles the first 200ms of  EVERY sound.. no matter what.. AND cuts of the last 200ms of the audio file

 

 

 

 

i just didn't hear it because there is silence on every other audio file i own on the beginning for at least 500ms..

 

this is definitely a bug IMHO..  the solution is to add 200ms silence but then the loop is broken.. damn :(

Share this post


Link to post
Share on other sites

so after an hour of testing i could pinpoint the problem:   

 

cocoonjs doubles the first 200ms of  EVERY sound.. no matter what.. AND cuts of the last 200ms of the audio file

 

 

 

 

i just didn't hear it because there is silence on every other audio file i own on the beginning for at least 500ms..

 

this is definitely a bug IMHO..  the solution is to add 200ms silence but then the loop is broken.. damn :(

Same problem here.

Share this post


Link to post
Share on other sites

i've asked ludei for help in this thread and this is the answer:

http://www.html5gamedevs.com/topic/3980-common-phaser-cocoonjs-issues/?p=63288

 

looks like there is no fix for this right now..   that's really bad..

 

i hope @rich  has an idea on this...  ludei proposed a workaround but i honestly don't know how to do this 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.