diff --git a/src/platform/javascript/AlphaSynthWebWorkerApi.ts b/src/platform/javascript/AlphaSynthWebWorkerApi.ts index ec7b5aa7b..cf9a496b3 100644 --- a/src/platform/javascript/AlphaSynthWebWorkerApi.ts +++ b/src/platform/javascript/AlphaSynthWebWorkerApi.ts @@ -207,9 +207,6 @@ export class AlphaSynthWebWorkerApi implements IAlphaSynth { // // API communicating with the web worker public play(): boolean { - if (this.state === PlayerState.Playing || !this.isReadyForPlayback) { - return false; - } this._output.activate(); this._synth.postMessage({ cmd: 'alphaSynth.play' diff --git a/src/synth/AlphaSynth.ts b/src/synth/AlphaSynth.ts index e3b96af8e..aa7e15267 100644 --- a/src/synth/AlphaSynth.ts +++ b/src/synth/AlphaSynth.ts @@ -173,7 +173,7 @@ export class AlphaSynth implements IAlphaSynth { } public play(): boolean { - if (this.state === PlayerState.Playing || !this.isReadyForPlayback) { + if (this.state === PlayerState.Playing || !this._isMidiLoaded) { return false; } this.output.activate(); @@ -188,7 +188,7 @@ export class AlphaSynth implements IAlphaSynth { } public pause(): void { - if (this.state === PlayerState.Paused || !this.isReadyForPlayback) { + if (this.state === PlayerState.Paused || !this._isMidiLoaded) { return; } Logger.debug('AlphaSynth', 'Pausing playback'); @@ -201,7 +201,7 @@ export class AlphaSynth implements IAlphaSynth { } public playPause(): void { - if (this.state === PlayerState.Playing || !this.isReadyForPlayback) { + if (this.state === PlayerState.Playing || !this._isMidiLoaded) { this.pause(); } else { this.play(); @@ -209,7 +209,7 @@ export class AlphaSynth implements IAlphaSynth { } public stop(): void { - if (!this.isReadyForPlayback) { + if (!this._isMidiLoaded) { return; } Logger.debug('AlphaSynth', 'Stopping playback');