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

Method _playInternal

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

Source from the content-addressed store, hash-verified

333 }
334
335 private _playInternal() {
336 if (this.sequencer.isPlayingOneTimeMidi) {
337 Logger.debug('AlphaSynth', 'Cancelling one time midi');
338 this._stopOneTimeMidi();
339 }
340
341 Logger.debug('AlphaSynth', 'Starting playback');
342 this.synthesizer.setupMetronomeChannel(this.sequencer.metronomeChannel, this.metronomeVolume);
343 this._synthStopping = false;
344 this.state = PlayerState.Playing;
345 (this.stateChanged as EventEmitterOfT<PlayerStateChangedEventArgs>).trigger(
346 new PlayerStateChangedEventArgs(this.state, false)
347 );
348 }
349
350 public pause(): void {
351 if (this.state === PlayerState.Paused || !this._isMidiLoaded) {

Callers 2

playMethod · 0.95
checkForFinishMethod · 0.95

Calls 4

_stopOneTimeMidiMethod · 0.95
debugMethod · 0.65
setupMetronomeChannelMethod · 0.65
triggerMethod · 0.45

Tested by

no test coverage detected