fix(vm): nans in the Go VM trisaw oscillator when the color was 0

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2026-01-27 23:10:53 +02:00
parent 86ca3fb300
commit ca4b87d43d
2 changed files with 2 additions and 1 deletions

View File

@ -500,7 +500,7 @@ func (s *GoSynth) Render(buffer sointu.AudioBuffer, maxtime int) (samples int, r
*statevar -= float32(int(*statevar+1) - 1)
phase := *statevar
phase += params[2]
phase -= float32(int(phase))
phase -= float32(int(phase+1) - 1)
color := params[3]
switch {
case flags&0x40 == 0x40: // Sine