mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-28 12:33:12 +00:00
Update Context.resume() to more closely match AudioContext.resume()
Closes Tonejs/Tone.js#767
This commit is contained in:
parent
aed85b0f47
commit
249fdf4f10
1 changed files with 1 additions and 1 deletions
|
@ -438,7 +438,7 @@ export class Context extends BaseContext {
|
||||||
* to initially start the AudioContext. See [[Tone.start]]
|
* to initially start the AudioContext. See [[Tone.start]]
|
||||||
*/
|
*/
|
||||||
resume(): Promise<void> {
|
resume(): Promise<void> {
|
||||||
if (this._context.state === "suspended" && isAudioContext(this._context)) {
|
if (isAudioContext(this._context)) {
|
||||||
return this._context.resume();
|
return this._context.resume();
|
||||||
} else {
|
} else {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
|
|
Loading…
Reference in a new issue