MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / play

Method play

packages/alphatab/src/synth/AlphaSynth.ts:316–333  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 1

playPauseMethod · 0.95

Calls 7

_playInternalMethod · 0.95
updateTimePositionMethod · 0.95
startCountInMethod · 0.80
activateMethod · 0.65
debugMethod · 0.65
setupMetronomeChannelMethod · 0.65
playMethod · 0.65

Tested by

no test coverage detected