@coderline/alphatab 1.3.0-alpha.200 → 1.3.0-alpha.208

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -869,6 +869,12 @@ declare class PlayerSettings {
869
869
  * Gets or sets whether the triplet feel should be applied/played during audio playback.
870
870
  */
871
871
  playTripletFeel: boolean;
872
+ /**
873
+ * Gets or sets how many milliseconds of audio samples should be buffered in total.
874
+ * Larger buffers cause a delay from when audio settings like volumes will be applied.
875
+ * Smaller buffers can cause audio crackling due to constant buffering that is happening.
876
+ */
877
+ bufferTimeInMilliseconds: number;
872
878
  }
873
879
 
874
880
  /**
@@ -4461,11 +4467,6 @@ declare class BoundsLookup {
4461
4467
  * Finishes the lookup for optimized access.
4462
4468
  */
4463
4469
  finish(): void;
4464
- /**
4465
- * Adds a new note to the lookup.
4466
- * @param bounds The note bounds to add.
4467
- */
4468
- addNote(bounds: NoteBounds): void;
4469
4470
  /**
4470
4471
  * Adds a new stave group to the lookup.
4471
4472
  * @param bounds The stave group bounds to add.
@@ -4499,6 +4500,12 @@ declare class BoundsLookup {
4499
4500
  * @returns The beat bounds if it was rendered, or null if no boundary information is available.
4500
4501
  */
4501
4502
  findBeat(beat: Beat): BeatBounds | null;
4503
+ /**
4504
+ * Tries to find the bounds of a given beat.
4505
+ * @param beat The beat to find.
4506
+ * @returns The beat bounds if it was rendered, or null if no boundary information is available.
4507
+ */
4508
+ findBeats(beat: Beat): BeatBounds[] | null;
4502
4509
  /**
4503
4510
  * Tries to find a beat at the given absolute position.
4504
4511
  * @param x The absolute X-position of the beat to find.
@@ -4946,14 +4953,21 @@ declare class AlphaTabApiBase<TSettings> {
4946
4953
  playedBeatChanged: IEventEmitterOfT<Beat>;
4947
4954
  private onPlayedBeatChanged;
4948
4955
  private _beatMouseDown;
4956
+ private _noteMouseDown;
4949
4957
  private _selectionStart;
4950
4958
  private _selectionEnd;
4951
4959
  beatMouseDown: IEventEmitterOfT<Beat>;
4952
4960
  beatMouseMove: IEventEmitterOfT<Beat>;
4953
4961
  beatMouseUp: IEventEmitterOfT<Beat | null>;
4962
+ noteMouseDown: IEventEmitterOfT<Note>;
4963
+ noteMouseMove: IEventEmitterOfT<Note>;
4964
+ noteMouseUp: IEventEmitterOfT<Note | null>;
4954
4965
  private onBeatMouseDown;
4966
+ private onNoteMouseDown;
4955
4967
  private onBeatMouseMove;
4968
+ private onNoteMouseMove;
4956
4969
  private onBeatMouseUp;
4970
+ private onNoteMouseUp;
4957
4971
  private updateSelectionCursor;
4958
4972
  private setupClickHandling;
4959
4973
  private cursorSelectRange;
@@ -6589,7 +6603,7 @@ interface ISynthOutput {
6589
6603
  /**
6590
6604
  * Called when the output should be opened.
6591
6605
  */
6592
- open(): void;
6606
+ open(bufferTimeInMilliseconds: number): void;
6593
6607
  /**
6594
6608
  * Called when the output should start the playback.
6595
6609
  */
@@ -6644,6 +6658,7 @@ declare class AlphaSynth implements IAlphaSynth {
6644
6658
  private _countInVolume;
6645
6659
  private _playedEventsQueue;
6646
6660
  private _midiEventsPlayedFilter;
6661
+ private _notPlayedSamples;
6647
6662
  /**
6648
6663
  * Gets the {@link ISynthOutput} used for playing the generated samples.
6649
6664
  */
@@ -6676,7 +6691,7 @@ declare class AlphaSynth implements IAlphaSynth {
6676
6691
  * Initializes a new instance of the {@link AlphaSynth} class.
6677
6692
  * @param output The output to use for playing the generated samples.
6678
6693
  */
6679
- constructor(output: ISynthOutput);
6694
+ constructor(output: ISynthOutput, bufferTimeInMilliseconds: number);
6680
6695
  play(): boolean;
6681
6696
  private playInternal;
6682
6697
  pause(): void;
@@ -6695,9 +6710,9 @@ declare class AlphaSynth implements IAlphaSynth {
6695
6710
  resetChannelStates(): void;
6696
6711
  setChannelSolo(channel: number, solo: boolean): void;
6697
6712
  setChannelVolume(channel: number, volume: number): void;
6698
- private onAudioSettingsUpdate;
6699
6713
  private onSamplesPlayed;
6700
6714
  private checkForFinish;
6715
+ private stopOneTimeMidi;
6701
6716
  private updateTimePosition;
6702
6717
  readonly ready: IEventEmitter;
6703
6718
  readonly readyForPlayback: IEventEmitter;
@@ -6755,7 +6770,7 @@ declare class AlphaSynthWebWorkerApi implements IAlphaSynth {
6755
6770
  set isLooping(value: boolean);
6756
6771
  get playbackRange(): PlaybackRange | null;
6757
6772
  set playbackRange(value: PlaybackRange | null);
6758
- constructor(player: ISynthOutput, alphaSynthScriptFile: string, logLevel: LogLevel);
6773
+ constructor(player: ISynthOutput, alphaSynthScriptFile: string, logLevel: LogLevel, bufferTimeInMilliseconds: number);
6759
6774
  destroy(): void;
6760
6775
  play(): boolean;
6761
6776
  pause(): void;