How do I achieve seamless looping music with Cordova

0 favourites
  • 7 posts
From the Asset Store
6 looping tracks to use in your games and projects. These tracks are in the style of the 1960s detective movie genre.
  • Hi everyone,

    I've been working with XDK / Corvoda / Crosswalk for awhile now and it's been great. However I have been noticing a problem with music files. It seems there is a noticeable hiccup in looping audio.

    I realize that this is most likely due to the audio format m4a for iOS.. which is much like mp3 in that it doesn't allow

    However even with Android via Crosswalk it too had poor music looping.

    So long story short, is there some special setting(s) or perhaps 3rd party audio plugin someone has out there that allows me to load music and have it play great.

    I remember one of the nice things I experienced with CocoonJS when I ported my game over to the OUYA was that they had great looping music.

    With all the advances we've made with HTML5 / Cordova, I hate to think Construct 2 games are unable to simply play looping music smoothly.. I hope there is a solution for this because so far I've managed to be able to work around this problem, but at some point I'm going to really need the ability to play something seamlessly and I don't think this is an unreasonable request or expectation in 2015

    Thanks,

    Caleb

  • bump.

  • bump

  • yes I would like to know this as well.. just listened to my loops and there's a GIANT pause between the loop point

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • jobel the only solution I have found is to use "effects" instead of music for playing songs.. this means basically that music will loop seamlessly.. i think the only trade off is that the music is uncompressed so it might add some size to your game.. so keep your songs short.

    I don't know about a giant gap, but yea if you want smooth looping music import the music as a sound effect not as "music" and it should be fine.

    if you need to start / stop music it gets trickier.. but for my last game http://www.kongregate.com/games/part12s ... video-game i actually (because it was slowing me down) just played both songs all the time and simply control volume of both turning down the audio on one as i turn up the audio on the other.. not ideal, but it gets the job done.

  • jobel the only solution I have found is to use "effects" instead of music for playing songs.. this means basically that music will loop seamlessly.. i think the only trade off is that the music is uncompressed so it might add some size to your game.. so keep your songs short.

    I don't know about a giant gap, but yea if you want smooth looping music import the music as a sound effect not as "music" and it should be fine.

    if you need to start / stop music it gets trickier.. but for my last game http://www.kongregate.com/games/part12s ... video-game i actually (because it was slowing me down) just played both songs all the time and simply control volume of both turning down the audio on one as i turn up the audio on the other.. not ideal, but it gets the job done.

    that reads it into memory though...

    I read a work around somewhere that seemed to do the trick... play music NOT LOOPED then make a Trigger on tag finished, then start the track again. Basically manually looping... so far so good..

  • two relatively short songs wasn't a problem but yea if you wanted lots of music it could become an issue maybe.

    yea i'll have to try that approach next time and see how it does.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)