Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by SlouchCouch

I have two music files in both ogg and m4a format, but chrome uses the.ogg version.

Whenever i have both music files to preload in the code in my game's main about 50% of the time chrome will hang loading the 2nd one. It doesn't matter which one is second. It will always load the first one then 50% of the time the 2nd one will start to load then hang.

Works fine in firefox (which also uses ogg) and safari (which is webkit but uses the m4a files instead).

Then if i refresh there's about a 50% chance it will hang again trying to load the 2nd son.

If I comment out either one of the songs preventing it from preloading the loader will load every time with no problems.

Anyone run into anything similar to this? I'm loading all my stuff locally on apache running on my local machine, so it should load easily.

-dave

1 decade ago by SlouchCouch

also maybe related, probably unrelated:
In chrome if the music does successfully play it stops after all the songs have played once and doesn't play music anymore even if i open up the console and do:
ig.music.play();

if i check ig.music.currentIndex it is 0.
if i check ig.music.currentTrack.currentTime it is also 0.
after executing ig.music.play() no music plays and both of the above remain at zero despite ig.music.tracks still containing the two songs.

1 decade ago by SlouchCouch

ok i think i fixed both problems. I'm guessing they were related to a feature in chrome that downloads audio files bits at a time and handles them in weird ways. https://code.google.com/p/chromium/issues/detail?id=111281

I took the song file sizes down from both over 5MB to 2.5MB and 1.9MB and now chrome loads the game every time and it never stops and loops properly.

ugh, what a pain.

1 decade ago by Joncom

Been having very similar issues. Had several songs loaded for use with ig.music. Would frequently get the loading bar stuck issue.

However the fix that others used (changing the order of ig.Sound.use to prefer MP3 over OGG) did not work because: although it fixed the loading-bar issue, it created another issue wherein the music would stop playing after minute or two.

My music files were between 3-5MB. After slimming them down to ~2.5MB per OGG file, and using the default ig.Sound.use setting, the game now appears to be loading consistenly.

Just refreshed about 30 times. Looking good!
Thank you for this post SlouchCouch.
Was about to go insane lol.
Page 1 of 1
« first « previous next › last »