This commit is contained in:
Yotam Mann 2017-10-26 01:07:53 -04:00
parent 9449a6102c
commit 7a870296bc
4 changed files with 11 additions and 11 deletions

View file

@ -13,14 +13,14 @@ define(["Tone/core/Tone"], function(Tone){
} else {
return Promise.resolve();
}
}
};
}
//not functionally equivalent
if (!AudioContext.prototype.resume){
AudioContext.prototype.resume = function(){
return Promise.resolve();
}
};
}
}
});

View file

@ -69,7 +69,7 @@ define(["Tone/core/Tone", "Tone/core/Timeline"], function (Tone) {
if (!AudioParam.prototype.hasOwnProperty("minValue")){
Object.defineProperty(AudioParam.prototype, "minValue", {
get : function(){
return -3.4028235e38
return -3.4028235e38;
}
});
}
@ -78,7 +78,7 @@ define(["Tone/core/Tone", "Tone/core/Timeline"], function (Tone) {
if (!AudioParam.prototype.hasOwnProperty("maxValue")){
Object.defineProperty(AudioParam.prototype, "maxValue", {
get : function(){
return 3.4028235e38
return 3.4028235e38;
}
});
}
@ -100,7 +100,7 @@ define(["Tone/core/Tone", "Tone/core/Timeline"], function (Tone) {
initializeAudioParam(this);
//check if the exponential ramp is starting from above 0
if (method === AutomationType.Exponential){
var before = this._events.get(time)
var before = this._events.get(time);
if (before && this.getValueAtTime(before.time) <= 0){
throw new Error("exponentialRampToValueAtTime must ramp from a value > 0");
}
@ -113,7 +113,7 @@ define(["Tone/core/Tone", "Tone/core/Timeline"], function (Tone) {
});
//invoke the native method
return AudioParam.prototype[nativeMethodName].call(this, value, time);
}
};
}
});
@ -156,7 +156,7 @@ define(["Tone/core/Tone", "Tone/core/Timeline"], function (Tone) {
}
//call the native method
return this._native_setValueCurveAtTime(values, time, duration);
}
};
}
// cancelScheduledValues

View file

@ -1,7 +1,7 @@
define(["Tone/core/Tone", "Tone/signal/WaveShaper", "Tone/component/Merge", "Tone/signal/Zero",
"Tone/component/Split", "Tone/core/Gain", "Tone/signal/Signal", "Tone/core/Context"], function(Tone){
if (Tone.supported && !StereoPannerNode){
if (Tone.supported && !window.StereoPannerNode){
/**
* @class Shimmed StereoPannerNode
@ -85,11 +85,11 @@ define(["Tone/core/Tone", "Tone/signal/WaveShaper", "Tone/component/Merge", "Ton
StereoPannerNode.prototype.disconnect = function(){
this.output.disconnect.apply(this.output, arguments);
}
};
StereoPannerNode.prototype.connect = function(){
this.output.connect.apply(this.output, arguments);
}
};
//add it to the AudioContext
AudioContext.prototype.createStereoPanner = function(){

View file

@ -100,7 +100,7 @@ define(["Tone/core/Tone", "Tone/component/Volume", "Tone/core/AudioNode"], funct
});
//didn't find a matching device
if (!device && devices.length > 0){
device = devices[0]
device = devices[0];
} else if (!device){
throw new Error("Tone.UserMedia: no matching device: "+labelOrId);
}