Skip to content

Commit

Permalink
loop hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
spessasus committed Mar 2, 2025
1 parent e395577 commit de62300
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SpessaSynth",
"version": "3.24.7",
"version": "3.24.8",
"type": "module",
"scripts": {
"start": "node src/website/server/server.js",
Expand Down
5 changes: 4 additions & 1 deletion src/spessasynth_lib/sequencer/worklet_sequencer/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ export function processMessage(messageType, messageData)
{
this.loopCount = Infinity;
}
this.loopCount = count;
else
{
this.loopCount = count;
}
break;

case WorkletSequencerMessageType.changeSong:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function _processTick()
let eventNext = this.tracks[trackIndex][this.eventIndex[trackIndex]];
this.playedTime += this.oneTickToSeconds * (eventNext.ticks - event.ticks);

const canLoop = this.loop && this.loopCount > 0;
const canLoop = this.loop && (this.loopCount > 0 || this.loopCount === -1);

// if we reached loop.end
if ((this.midiData.loop.end <= event.ticks) && canLoop)
Expand Down
4 changes: 2 additions & 2 deletions src/spessasynth_lib/synthetizer/worklet_processor.min.js

Large diffs are not rendered by default.

0 comments on commit de62300

Please sign in to comment.