fix(tracker): reset Player.prevVal when new recording is started

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2026-02-14 20:28:02 +02:00
parent e66ff8be9f
commit 942da94982

View File

@ -316,6 +316,7 @@ loop:
case RecordingMsg:
if m.bool {
p.recording = Recording{State: RecordingWaitingForNote}
p.prevVal = p.prevVal[:0] // reset prevVal, so that instruments configured to respond only to changes in values would trigger correctly in the new recording
} else {
if p.recording.State == RecordingStarted && len(p.recording.Events) > 0 {
p.recording.Finish(p.frame, p.frameDeltas)