mirror of
https://github.com/vsariola/sointu.git
synced 2026-02-14 04:03:23 -05:00
fix(vm): nans in the Go VM trisaw oscillator when the color was 0
This commit is contained in:
parent
86ca3fb300
commit
ca4b87d43d
@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
roughly to -12 dBFS true peak. ([#211][i211])
|
roughly to -12 dBFS true peak. ([#211][i211])
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- Occasional NaNs in the Trisaw oscillator when the color was 0 in the Go VM.
|
||||||
- The tracker thought that "sync" unit pops the value from stack, even if the VM
|
- The tracker thought that "sync" unit pops the value from stack, even if the VM
|
||||||
did not, resulting it claiming errors in patches that worked once compiled.
|
did not, resulting it claiming errors in patches that worked once compiled.
|
||||||
|
|
||||||
|
|||||||
@ -500,7 +500,7 @@ func (s *GoSynth) Render(buffer sointu.AudioBuffer, maxtime int) (samples int, r
|
|||||||
*statevar -= float32(int(*statevar+1) - 1)
|
*statevar -= float32(int(*statevar+1) - 1)
|
||||||
phase := *statevar
|
phase := *statevar
|
||||||
phase += params[2]
|
phase += params[2]
|
||||||
phase -= float32(int(phase))
|
phase -= float32(int(phase+1) - 1)
|
||||||
color := params[3]
|
color := params[3]
|
||||||
switch {
|
switch {
|
||||||
case flags&0x40 == 0x40: // Sine
|
case flags&0x40 == 0x40: // Sine
|
||||||
|
|||||||
Reference in New Issue
Block a user