Description:
Multishot play and stop.
Result:
Play multi times. Stop all when click stop button.
Code:
            var source = null;
            
            function onload() {
                var engine = new jWebAudio.SoundEngine();
                source = engine.addSoundSource({
                    'url': '../../examples/resource/a.ogg',
                    'multishot': true,
                    'preLoad': true,
                    'callback': function() {
                        document.getElementById('playBtn').disabled = false;
                        document.getElementById('stopBtn').disabled = false;
                    }
                });
            }
            
            function play() {
                source.sound.play();
            }
            
            function stop() {
                source.sound.stop();
            }