removed ability to set new AudioContext

for now…
This commit is contained in:
Yotam Mann 2014-06-18 01:35:56 -04:00
parent 7d02476732
commit 93d053aec5

View file

@ -41,16 +41,12 @@
//SHIMS////////////////////////////////////////////////////////////////////
function shimAudioContext(ac){
if (typeof ac.createGain !== "function"){
ac.createGain = ac.createGainNode;
}
if (typeof ac.createDelay !== "function"){
ac.createDelay = ac.createDelayNode;
}
if (typeof audioContext.createGain !== "function"){
audioContext.createGain = audioContext.createGainNode;
}
if (typeof audioContext.createDelay !== "function"){
audioContext.createDelay = audioContext.createDelayNode;
}
shimAudioContext(audioContext);
if (typeof AudioBufferSourceNode.prototype.start !== "function"){
AudioBufferSourceNode.prototype.start = AudioBufferSourceNode.prototype.noteGrainOn;
@ -358,16 +354,5 @@
child.prototype.constructor = child;
};
/**
* sets an audio context different from the original one
* [note] the new context will be shimmed
*
* @param {AudioContext} ac
*/
Tone.setAudioContext = function(ac){
audioContext = ac;
shimAudioContext(ac);
};
return Tone;
}));