AudioContext resume does not apply to OfflineAudioContext

This commit is contained in:
Yotam Mann 2018-06-20 14:56:35 -04:00
parent 8a74995f2e
commit 36c19e3762

View file

@ -141,7 +141,7 @@ define(["Tone/core/Tone", "Tone/core/Emitter", "Tone/core/Timeline", "Tone/shim/
* @return {Promise} * @return {Promise}
*/ */
Tone.Context.prototype.resume = function(){ Tone.Context.prototype.resume = function(){
if (this._context.state !== "running"){ if (this._context.state !== "running" && this._context instanceof AudioContext){
return this._context.resume(); return this._context.resume();
} else { } else {
return Promise.resolve(); return Promise.resolve();