From 18d466803f7df62bdca09fce534248dcff8e8602 Mon Sep 17 00:00:00 2001 From: vsariola <5684185+vsariola@users.noreply.github.com> Date: Wed, 17 Feb 2021 17:49:53 +0200 Subject: [PATCH] fix(sointu): fix StackUse calculation for empty unit (unit.Type == "") --- sointu.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sointu.go b/sointu.go index 942303f..fd8b3ff 100644 --- a/sointu.go +++ b/sointu.go @@ -532,7 +532,7 @@ func (u *Unit) StackChange() int { func (u *Unit) StackNeed() int { switch u.Type { - case "envelope", "oscillator", "noise", "receive", "loadnote", "loadval", "in": + case "", "envelope", "oscillator", "noise", "receive", "loadnote", "loadval", "in": return 0 case "mulp", "mul", "add", "addp", "xch": return 2 * (1 + u.Parameters["stereo"])