fix(tracker): kill all notes except effects when starting play / skipping play position

Fixes #45.
This commit is contained in:
vsariola 2021-04-12 20:15:55 +03:00
parent ce52aa0ee9
commit 0767440e60

View File

@ -131,6 +131,14 @@ func NewPlayer(service sointu.SynthService, closer <-chan struct{}, patchs <-cha
p.release(id)
}
p.mutex.Unlock()
} else {
p.mutex.Lock()
for i, t := range score.Tracks {
if !t.Effect && i < len(trackIDs) { // when starting to play from another position, release only non-effect tracks
p.release(trackIDs[i])
}
}
p.mutex.Unlock()
}
rowTime = math.MaxInt32
default: