@coderline/alphatab 1.6.0-alpha.1403 → 1.6.0-alpha.1408

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab v1.6.0-alpha.1403 (develop, build 1403)
2
+ * alphaTab v1.6.0-alpha.1408 (develop, build 1408)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -26567,38 +26567,51 @@ class Voice {
26567
26567
  */
26568
26568
  Voice.RenderEffectSampleBlock = SynthConstants.MicroBufferSize;
26569
26569
 
26570
+ class QueueItem {
26571
+ constructor(value) {
26572
+ this.value = value;
26573
+ }
26574
+ }
26570
26575
  class Queue {
26571
- constructor() {
26572
- this._items = [];
26573
- this._position = 0;
26574
- this.isEmpty = true;
26576
+ get isEmpty() {
26577
+ return this._head === undefined;
26575
26578
  }
26576
26579
  clear() {
26577
- this._items = [];
26578
- this._position = 0;
26579
- this.isEmpty = true;
26580
+ this._head = undefined;
26581
+ this._tail = undefined;
26580
26582
  }
26581
26583
  enqueue(item) {
26582
- this.isEmpty = false;
26583
- this._items.push(item);
26584
+ const queueItem = new QueueItem(item);
26585
+ if (this._tail) {
26586
+ // not empty -> add after tail
26587
+ this._tail.next = queueItem;
26588
+ this._tail = queueItem;
26589
+ }
26590
+ else {
26591
+ // empty -> new item takes head and tail
26592
+ this._head = queueItem;
26593
+ this._tail = queueItem;
26594
+ }
26584
26595
  }
26585
26596
  peek() {
26586
- return this._items[this._position];
26597
+ const head = this._head;
26598
+ if (!head) {
26599
+ return undefined;
26600
+ }
26601
+ return head.value;
26587
26602
  }
26588
26603
  dequeue() {
26589
- const item = this._items[this._position];
26590
- this._position++;
26591
- if (this._position >= this._items.length / 2) {
26592
- this._items = this._items.slice(this._position);
26593
- this._position = 0;
26604
+ const head = this._head;
26605
+ if (!head) {
26606
+ return undefined;
26594
26607
  }
26595
- this.isEmpty = this._items.length === 0;
26596
- return item;
26597
- }
26598
- toArray() {
26599
- const items = this._items.slice(this._position);
26600
- items.reverse();
26601
- return items;
26608
+ const newHead = head.next;
26609
+ this._head = newHead;
26610
+ // last item removed?
26611
+ if (!newHead) {
26612
+ this._tail = undefined;
26613
+ }
26614
+ return head.value;
26602
26615
  }
26603
26616
  }
26604
26617
 
@@ -28516,13 +28529,14 @@ class AlphaSynthBase {
28516
28529
  this._playedEventsQueue.clear();
28517
28530
  }
28518
28531
  else {
28519
- const playedEvents = new Queue();
28532
+ const playedEvents = [];
28520
28533
  while (!this._playedEventsQueue.isEmpty && this._playedEventsQueue.peek().time < currentTime) {
28521
28534
  const synthEvent = this._playedEventsQueue.dequeue();
28522
- playedEvents.enqueue(synthEvent.event);
28535
+ playedEvents.push(synthEvent.event);
28523
28536
  }
28524
- if (!playedEvents.isEmpty) {
28525
- this.midiEventsPlayed.trigger(new MidiEventsPlayedEventArgs(playedEvents.toArray()));
28537
+ if (playedEvents.length > 0) {
28538
+ playedEvents.reverse();
28539
+ this.midiEventsPlayed.trigger(new MidiEventsPlayedEventArgs(playedEvents));
28526
28540
  }
28527
28541
  }
28528
28542
  }
@@ -60296,9 +60310,9 @@ class VersionInfo {
60296
60310
  print(`build date: ${VersionInfo.date}`);
60297
60311
  }
60298
60312
  }
60299
- VersionInfo.version = '1.6.0-alpha.1403';
60300
- VersionInfo.date = '2025-05-09T02:06:22.101Z';
60301
- VersionInfo.commit = '3644a11f557063573413de459c607a1f9c302a6a';
60313
+ VersionInfo.version = '1.6.0-alpha.1408';
60314
+ VersionInfo.date = '2025-05-13T02:08:06.970Z';
60315
+ VersionInfo.commit = '37b936b4f5eb8bf759bc78bdb4dd1812d7b2a072';
60302
60316
 
60303
60317
  /**
60304
60318
  * A factory for custom layout engines.
@@ -11865,14 +11865,13 @@ export declare class ProgressEventArgs {
11865
11865
  }
11866
11866
 
11867
11867
  declare class Queue<T> {
11868
- private _items;
11869
- private _position;
11870
- isEmpty: boolean;
11868
+ private _head?;
11869
+ private _tail?;
11870
+ get isEmpty(): boolean;
11871
11871
  clear(): void;
11872
11872
  enqueue(item: T): void;
11873
- peek(): T;
11874
- dequeue(): T;
11875
- toArray(): T[];
11873
+ peek(): T | undefined;
11874
+ dequeue(): T | undefined;
11876
11875
  }
11877
11876
 
11878
11877
  /**
package/dist/alphaTab.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab v1.6.0-alpha.1403 (develop, build 1403)
2
+ * alphaTab v1.6.0-alpha.1408 (develop, build 1408)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -26573,38 +26573,51 @@
26573
26573
  */
26574
26574
  Voice.RenderEffectSampleBlock = SynthConstants.MicroBufferSize;
26575
26575
 
26576
+ class QueueItem {
26577
+ constructor(value) {
26578
+ this.value = value;
26579
+ }
26580
+ }
26576
26581
  class Queue {
26577
- constructor() {
26578
- this._items = [];
26579
- this._position = 0;
26580
- this.isEmpty = true;
26582
+ get isEmpty() {
26583
+ return this._head === undefined;
26581
26584
  }
26582
26585
  clear() {
26583
- this._items = [];
26584
- this._position = 0;
26585
- this.isEmpty = true;
26586
+ this._head = undefined;
26587
+ this._tail = undefined;
26586
26588
  }
26587
26589
  enqueue(item) {
26588
- this.isEmpty = false;
26589
- this._items.push(item);
26590
+ const queueItem = new QueueItem(item);
26591
+ if (this._tail) {
26592
+ // not empty -> add after tail
26593
+ this._tail.next = queueItem;
26594
+ this._tail = queueItem;
26595
+ }
26596
+ else {
26597
+ // empty -> new item takes head and tail
26598
+ this._head = queueItem;
26599
+ this._tail = queueItem;
26600
+ }
26590
26601
  }
26591
26602
  peek() {
26592
- return this._items[this._position];
26603
+ const head = this._head;
26604
+ if (!head) {
26605
+ return undefined;
26606
+ }
26607
+ return head.value;
26593
26608
  }
26594
26609
  dequeue() {
26595
- const item = this._items[this._position];
26596
- this._position++;
26597
- if (this._position >= this._items.length / 2) {
26598
- this._items = this._items.slice(this._position);
26599
- this._position = 0;
26610
+ const head = this._head;
26611
+ if (!head) {
26612
+ return undefined;
26600
26613
  }
26601
- this.isEmpty = this._items.length === 0;
26602
- return item;
26603
- }
26604
- toArray() {
26605
- const items = this._items.slice(this._position);
26606
- items.reverse();
26607
- return items;
26614
+ const newHead = head.next;
26615
+ this._head = newHead;
26616
+ // last item removed?
26617
+ if (!newHead) {
26618
+ this._tail = undefined;
26619
+ }
26620
+ return head.value;
26608
26621
  }
26609
26622
  }
26610
26623
 
@@ -28522,13 +28535,14 @@
28522
28535
  this._playedEventsQueue.clear();
28523
28536
  }
28524
28537
  else {
28525
- const playedEvents = new Queue();
28538
+ const playedEvents = [];
28526
28539
  while (!this._playedEventsQueue.isEmpty && this._playedEventsQueue.peek().time < currentTime) {
28527
28540
  const synthEvent = this._playedEventsQueue.dequeue();
28528
- playedEvents.enqueue(synthEvent.event);
28541
+ playedEvents.push(synthEvent.event);
28529
28542
  }
28530
- if (!playedEvents.isEmpty) {
28531
- this.midiEventsPlayed.trigger(new MidiEventsPlayedEventArgs(playedEvents.toArray()));
28543
+ if (playedEvents.length > 0) {
28544
+ playedEvents.reverse();
28545
+ this.midiEventsPlayed.trigger(new MidiEventsPlayedEventArgs(playedEvents));
28532
28546
  }
28533
28547
  }
28534
28548
  }
@@ -60302,9 +60316,9 @@
60302
60316
  print(`build date: ${VersionInfo.date}`);
60303
60317
  }
60304
60318
  }
60305
- VersionInfo.version = '1.6.0-alpha.1403';
60306
- VersionInfo.date = '2025-05-09T02:06:22.101Z';
60307
- VersionInfo.commit = '3644a11f557063573413de459c607a1f9c302a6a';
60319
+ VersionInfo.version = '1.6.0-alpha.1408';
60320
+ VersionInfo.date = '2025-05-13T02:08:06.970Z';
60321
+ VersionInfo.commit = '37b936b4f5eb8bf759bc78bdb4dd1812d7b2a072';
60308
60322
 
60309
60323
  /**
60310
60324
  * A factory for custom layout engines.