examples/hoa-panner-sofa2D.js
function loadSample(url, doAfterLoading) {
    var fetchSound = new XMLHttpRequest(); // Load the Sound with XMLHttpRequest
    fetchSound.open("GET", url, true); // Path to Audio File
    fetchSound.responseType = "arraybuffer"; // Read as Binary Data
    fetchSound.onload = function() {
        context.decodeAudioData(fetchSound.response, doAfterLoading);
    }
    fetchSound.send();
}
function loadSample(url, doAfterLoading) {
    var fetchSound = new XMLHttpRequest(); // Load the Sound with XMLHttpRequest
    fetchSound.open("GET", url, true); // Path to Audio File
    fetchSound.responseType = "arraybuffer"; // Read as Binary Data
    fetchSound.onload = function() {
        context.decodeAudioData(fetchSound.response, doAfterLoading);
    }
    fetchSound.send();
}
function loadSample ( url , doAfterLoading ) { var fetchSound = new XMLHttpRequest ( ) ; // Load the Sound with XMLHttpRequest fetchSound . open ( "GET" , url , true ) ; // Path to Audio File fetchSound . responseType = "arraybuffer" ; // Read as Binary Data fetchSound . onload = function ( ) { context . decodeAudioData ( fetchSound . response , doAfterLoading ) ; } fetchSound . send ( ) ; }
function to load samples
function to load samples