mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
fix(vm): prevent crash when only disabled delay units & test it
This commit is contained in:
parent
75bd9c591e
commit
350402f8f3
@ -142,7 +142,7 @@ func constructDelayTimeTable(patch sointu.Patch, bpm int) ([]int, [][]int) {
|
|||||||
for i, instr := range patch {
|
for i, instr := range patch {
|
||||||
unitindices[i] = make([]int, len(instr.Units))
|
unitindices[i] = make([]int, len(instr.Units))
|
||||||
for j, unit := range instr.Units {
|
for j, unit := range instr.Units {
|
||||||
if unit.Type == "delay" {
|
if unit.Type == "delay" && !unit.Disabled {
|
||||||
unitindices[i][j] = indices[ind[i][j]]
|
unitindices[i][j] = indices[ind[i][j]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user