I am using Version 2.0.15
I have sprite sounds and when I start one, it plays but then continues to play the other sprite sounds instead of ending.
var SFX = new Howl({
src: [audioSFXSprite],
sprite: {
asteroidDeath: [0,5270],
SFX_CatAppearsOnScreen: [6000,7150],
NonRocketCollectible_SFX: [14000,14800],
newGameSFX: [31000,32250],
},
onend: function() {
console.log('Finished!');
}
})
I start it using for example SFX.play('asteroidDeath') it will start at the right spot, but not finish and not fire the onend callback.
By the way, I already imported audioSFXSprite using ES6 and it starts playing fine so the source shouldn't be the issue I think.
Okay, what I hadn't realized was that each sprite needs the [start_time, duration]. I thought the second parameter was end_time but now I know it's the duration.
@SandMoshi Thank you, it helped me. I thought just like you first ;-)
Most helpful comment
@SandMoshi Thank you, it helped me. I thought just like you first ;-)