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

Method pause

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

Source from the content-addressed store, hash-verified

348 }
349
350 public pause(): void {
351 if (this.state === PlayerState.Paused || !this._isMidiLoaded) {
352 return;
353 }
354 Logger.debug('AlphaSynth', 'Pausing playback');
355 this.state = PlayerState.Paused;
356 (this.stateChanged as EventEmitterOfT<PlayerStateChangedEventArgs>).trigger(
357 new PlayerStateChangedEventArgs(this.state, false)
358 );
359 this.output.pause();
360 this.synthesizer.noteOffAll(false);
361 }
362
363 public playPause(): void {
364 if (this.state !== PlayerState.Paused || !this._isMidiLoaded) {

Callers 3

playPauseMethod · 0.95
playOneTimeMidiFileMethod · 0.95
loadSoundFontMethod · 0.95

Calls 4

debugMethod · 0.65
pauseMethod · 0.65
noteOffAllMethod · 0.65
triggerMethod · 0.45

Tested by

no test coverage detected