= context.createBuffer(audioData, true); soundSource.buffer = soundBuffer; convolver = context.createConvolver(); soundSource.connect(convolver); convolver.connect(context.destination); Convolve('echo.mp3', convolver, function() {playSound()}); } function Convolve(url, convolver, callback) { var request = new XMLHttpRequest(); request.open("GET", url, true); request.responseType = "arraybuffer"; request.onload = function () { convolver.buffer = context.createBuffer(request.response, false); callback(); } request.send(); } Saturday, June 8, 2013