()
| 314 | } |
| 315 | |
| 316 | public play(): boolean { |
| 317 | if (this.state !== PlayerState.Paused || !this._isMidiLoaded) { |
| 318 | return false; |
| 319 | } |
| 320 | this.output.activate(); |
| 321 | |
| 322 | this._playInternal(); |
| 323 | |
| 324 | if (this._countInVolume > 0) { |
| 325 | Logger.debug('AlphaSynth', 'Starting countin'); |
| 326 | this.sequencer.startCountIn(); |
| 327 | this.synthesizer.setupMetronomeChannel(this.sequencer.metronomeChannel, this._countInVolume); |
| 328 | this.updateTimePosition(0, true); |
| 329 | } |
| 330 | |
| 331 | this.output.play(); |
| 332 | return true; |
| 333 | } |
| 334 | |
| 335 | private _playInternal() { |
| 336 | if (this.sequencer.isPlayingOneTimeMidi) { |
no test coverage detected