@coderline/alphatab 1.3.0-alpha.136 → 1.3.0-alpha.137

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.
@@ -6602,6 +6602,7 @@ declare class AlphaSynth implements IAlphaSynth {
6602
6602
  resetChannelStates(): void;
6603
6603
  setChannelSolo(channel: number, solo: boolean): void;
6604
6604
  setChannelVolume(channel: number, volume: number): void;
6605
+ private onAudioSettingsUpdate;
6605
6606
  private onSamplesPlayed;
6606
6607
  private checkForFinish;
6607
6608
  private updateTimePosition;
package/dist/alphaTab.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * alphaTab v1.3.0-alpha.136 (develop, build 136)
2
+ * alphaTab v1.3.0-alpha.137 (develop, build 137)
3
3
  *
4
4
  * Copyright © 2021, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -17252,6 +17252,7 @@
17252
17252
  set masterVolume(value) {
17253
17253
  value = Math.max(value, SynthConstants.MinVolume);
17254
17254
  this._synthesizer.masterVolume = value;
17255
+ this.onAudioSettingsUpdate();
17255
17256
  }
17256
17257
  get metronomeVolume() {
17257
17258
  return this._metronomeVolume;
@@ -17260,6 +17261,7 @@
17260
17261
  value = Math.max(value, SynthConstants.MinVolume);
17261
17262
  this._metronomeVolume = value;
17262
17263
  this._synthesizer.metronomeVolume = value;
17264
+ this.onAudioSettingsUpdate();
17263
17265
  }
17264
17266
  get countInVolume() {
17265
17267
  return this._countInVolume;
@@ -17281,7 +17283,7 @@
17281
17283
  value = SynthHelper.clamp(value, SynthConstants.MinPlaybackSpeed, SynthConstants.MaxPlaybackSpeed);
17282
17284
  let oldSpeed = this._sequencer.playbackSpeed;
17283
17285
  this._sequencer.playbackSpeed = value;
17284
- this.updateTimePosition(this._timePosition * (oldSpeed / value), true);
17286
+ this.timePosition = this.timePosition * (oldSpeed / value);
17285
17287
  }
17286
17288
  get tickPosition() {
17287
17289
  return this._tickPosition;
@@ -17433,16 +17435,25 @@
17433
17435
  }
17434
17436
  setChannelMute(channel, mute) {
17435
17437
  this._synthesizer.channelSetMute(channel, mute);
17438
+ this.onAudioSettingsUpdate();
17436
17439
  }
17437
17440
  resetChannelStates() {
17438
17441
  this._synthesizer.resetChannelStates();
17439
17442
  }
17440
17443
  setChannelSolo(channel, solo) {
17441
17444
  this._synthesizer.channelSetSolo(channel, solo);
17445
+ this.onAudioSettingsUpdate();
17442
17446
  }
17443
17447
  setChannelVolume(channel, volume) {
17444
17448
  volume = Math.max(volume, SynthConstants.MinVolume);
17445
17449
  this._synthesizer.channelSetMixVolume(channel, volume);
17450
+ this.onAudioSettingsUpdate();
17451
+ }
17452
+ onAudioSettingsUpdate() {
17453
+ // seeking to the currently known position, will ensure we
17454
+ // clear all audio buffers and re-generate the audio
17455
+ // which was not actually played yet.
17456
+ this.timePosition = this.timePosition;
17446
17457
  }
17447
17458
  onSamplesPlayed(sampleCount) {
17448
17459
  let playedMillis = (sampleCount / this._synthesizer.outSampleRate) * 1000;
@@ -40281,8 +40292,8 @@
40281
40292
  // </auto-generated>
40282
40293
  class VersionInfo {
40283
40294
  }
40284
- VersionInfo.version = '1.3.0-alpha.136';
40285
- VersionInfo.date = '2021-11-28T16:51:01.877Z';
40295
+ VersionInfo.version = '1.3.0-alpha.137';
40296
+ VersionInfo.date = '2021-11-28T18:13:01.688Z';
40286
40297
 
40287
40298
  var index$5 = /*#__PURE__*/Object.freeze({
40288
40299
  __proto__: null,