mirror of
https://github.com/vsariola/sointu.git
synced 2026-02-24 17:14:00 -05:00
fix(sointu): fix StackUse calculation for empty unit (unit.Type == "")
This commit is contained in:
@ -532,7 +532,7 @@ func (u *Unit) StackChange() int {
|
|||||||
|
|
||||||
func (u *Unit) StackNeed() int {
|
func (u *Unit) StackNeed() int {
|
||||||
switch u.Type {
|
switch u.Type {
|
||||||
case "envelope", "oscillator", "noise", "receive", "loadnote", "loadval", "in":
|
case "", "envelope", "oscillator", "noise", "receive", "loadnote", "loadval", "in":
|
||||||
return 0
|
return 0
|
||||||
case "mulp", "mul", "add", "addp", "xch":
|
case "mulp", "mul", "add", "addp", "xch":
|
||||||
return 2 * (1 + u.Parameters["stereo"])
|
return 2 * (1 + u.Parameters["stereo"])
|
||||||
|
|||||||
Reference in New Issue
Block a user