Description:
Play sounds added using array.
Result:
Play respective sound when click button.
Code:
            function onload() {
                $('.sound').each(function() {
                    var url = '../../examples/resource/' + $(this).attr('id') + '.wav';
                    $(this).jWebAudio('addSoundSource', {
                        url: url,
                        preLoad: true
                    });
                });
            }
            
            function onPlayA() {
                $('#in').jWebAudio('play');
                $('#playA')[0].disabled = true;
            }
            
            function onPlayB() {
                $('#out').jWebAudio('play');
                $('#playB')[0].disabled = true;
            }