Revert "Encode URL when loading buffer (#318)"

This reverts commit e6db1daed8.
This commit is contained in:
Yotam Mann 2018-03-29 15:43:44 -04:00
parent e6db1daed8
commit 2841fefe40

View file

@ -466,18 +466,7 @@ define(["Tone/core/Tone", "Tone/core/Emitter", "Tone/type/Type", "Tone/shim/Audi
}
var request = new XMLHttpRequest();
// encode the url, separating by slash
var urlSplit = (Tone.Buffer.baseUrl + url).split("/");
var encodedUrl = "";
for (var urlSplitIdx = 0; urlSplitIdx < urlSplit.length; urlSplitIdx++){
if (urlSplitIdx > 0){
encodedUrl += "/";
}
encodedUrl += encodeURIComponent(urlSplit[urlSplitIdx]);
}
request.open("GET", encodedUrl, true);
request.open("GET", Tone.Buffer.baseUrl + url, true);
request.responseType = "arraybuffer";
//start out as 0
request.progress = 0;