diff --git a/Tone/core/Buffer.js b/Tone/core/Buffer.js index ac13a4d2..a79183d2 100644 --- a/Tone/core/Buffer.js +++ b/Tone/core/Buffer.js @@ -317,6 +317,13 @@ define(["Tone/core/Tone", "Tone/core/Emitter"], function(Tone){ Tone.Buffer.trigger("progress", completed / Tone.Buffer._totalDownloads); }; + /** + * A path which is prefixed before every url. + * @type {String} + * @static + */ + Tone.Buffer.baseUrl = ""; + /** * Makes an xhr reqest for the selected url then decodes * the file as an audio buffer. Invokes @@ -329,7 +336,7 @@ define(["Tone/core/Tone", "Tone/core/Emitter"], function(Tone){ */ Tone.Buffer.load = function(url, callback){ var request = new XMLHttpRequest(); - request.open("GET", url, true); + request.open("GET", Tone.Buffer.baseUrl + url, true); request.responseType = "arraybuffer"; // decode asynchronously request.onload = function() {