Update Context.resume() to more closely match AudioContext.resume()

Closes Tonejs/Tone.js#767
This commit is contained in:
Bryan Braun 2020-10-23 16:43:17 -04:00
parent aed85b0f47
commit 249fdf4f10
No known key found for this signature in database
GPG key ID: 53EDA7FF4BDBCE1D

View file

@ -438,7 +438,7 @@ export class Context extends BaseContext {
* to initially start the AudioContext. See [[Tone.start]]
*/
resume(): Promise<void> {
if (this._context.state === "suspended" && isAudioContext(this._context)) {
if (isAudioContext(this._context)) {
return this._context.resume();
} else {
return Promise.resolve();