audio-mixer-engine 1.3.2 → 1.3.3
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.
|
@@ -4054,7 +4054,7 @@ class jU {
|
|
|
4054
4054
|
*/
|
|
4055
4055
|
setMetronomeEnabled(l) {
|
|
4056
4056
|
const U = this.metronomeConfig.enabled;
|
|
4057
|
-
this.metronomeConfig.enabled = l, this.state === "playing" && (l && !U ? this._startMetronome() : !l && U && this._stopMetronome()), this._emitEvent("metronomeEnabledChanged", { enabled: l });
|
|
4057
|
+
this.metronomeConfig.enabled = l, this.state === "playing" && (l && !U ? (this._resetMetronomeBeatTracking(), this._startMetronome()) : !l && U && this._stopMetronome()), this._emitEvent("metronomeEnabledChanged", { enabled: l });
|
|
4058
4058
|
}
|
|
4059
4059
|
/**
|
|
4060
4060
|
* Configure metronome settings (can be changed during playback)
|
|
@@ -4559,7 +4559,7 @@ class jU {
|
|
|
4559
4559
|
* @private
|
|
4560
4560
|
*/
|
|
4561
4561
|
_completeLeadIn(l) {
|
|
4562
|
-
this._stopLeadIn(), this._emitEvent("leadInEnded", {}), this.leadInData = null, this.leadInProgress = null, this.leadInStartTime = null, this.state = "playing", this.midiPlayer && this.midiPlayer.markAsPlaying(), l && !this.leadInUsedMetronome && this._startMetronome(), this._emitEvent("playbackStarted", {
|
|
4562
|
+
this._stopLeadIn(), this._emitEvent("leadInEnded", {}), this.leadInData = null, this.leadInProgress = null, this.leadInStartTime = null, this.state = "playing", this.midiPlayer && this.midiPlayer.markAsPlaying(), this._resetMetronomeBeatTracking(), l && !this.leadInUsedMetronome && this._startMetronome(), this._emitEvent("playbackStarted", {
|
|
4563
4563
|
startupDelayMs: 0,
|
|
4564
4564
|
position: this.frozenTime
|
|
4565
4565
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "audio-mixer-engine",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Audio engine library for audio mixer applications with MIDI parsing, playback, and synthesis",
|
|
5
5
|
"main": "dist/audio-mixer-engine.cjs.js",
|
|
6
6
|
"module": "dist/audio-mixer-engine.es.js",
|
|
@@ -565,6 +565,8 @@ export default class PlaybackManager {
|
|
|
565
565
|
// Apply immediately if playing
|
|
566
566
|
if (this.state === 'playing') {
|
|
567
567
|
if (enabled && !wasEnabled) {
|
|
568
|
+
// Reset beat tracking before starting (prevents long skip loop)
|
|
569
|
+
this._resetMetronomeBeatTracking();
|
|
568
570
|
this._startMetronome();
|
|
569
571
|
} else if (!enabled && wasEnabled) {
|
|
570
572
|
this._stopMetronome();
|
|
@@ -1371,6 +1373,9 @@ export default class PlaybackManager {
|
|
|
1371
1373
|
this.midiPlayer.markAsPlaying();
|
|
1372
1374
|
}
|
|
1373
1375
|
|
|
1376
|
+
// Reset metronome beat tracking before starting (prevents long skip loop)
|
|
1377
|
+
this._resetMetronomeBeatTracking();
|
|
1378
|
+
|
|
1374
1379
|
// Start metronome if enabled (already synchronized with main playback)
|
|
1375
1380
|
if (useMetronome && !this.leadInUsedMetronome) {
|
|
1376
1381
|
this._startMetronome();
|