dimanche 26 mai 2019

Is there a way to make the sound loops seamlessly/ without gap using SoundJS?

I have here a background music loops properly but not seamlessly. What do I need to do? I tried searching but nothing works.

These is my code below.

createjs.Sound.on("fileload", handleLoad);
createjs.Sound.registerSound(resourcePath+'/sounds/bg.mp3', "bg");

function handleLoad(event) {
    createjs.Sound.play("coin");
    var myInstance = createjs.Sound.play("coin", {interrupt: createjs.Sound.INTERRUPT_ANY, loop:-1, volume: 1});
}




Aucun commentaire:

Enregistrer un commentaire