This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// loads remote file using fetch() streams and "pipe" it to webaudio API | |
// remote file must have CORS enabled if on another domain | |
// | |
// mostly from http://stackoverflow.com/questions/20475982/choppy-inaudible-playback-with-chunked-audio-through-web-audio-api | |
// | |
function play(url) { | |
var context = new (window.AudioContext || window.webkitAudioContext)(); |