I started working on an interactive soundtrack for my game and WebAudio is of cours perfect. Babylon already has a lot in place, so I will ask for some additions to make it more flexible. In the mean time I will just access private members.
I am going to start with a very small request
Proposal: add a public property ‘duration’ to BABYLON.Sound that accesses BABYLON.Sound._audioBuffer.duration
let me know if you would like me to start working on the Babylon source code!
p.s.: soundtrackPart2.play(soundtrackPart1._audioBuffer.duration) gives a very smooth transition; If I use soundtrackPart1.onended(() => soundtrackPart2.play()) it is not smooth at all.