vsariola / sointu

Fork of 4klang that can target 386, amd64 and WebAssembly. Tools run on Windows, Mac & Linux
MIT License
240 stars 15 forks source link

Improve NaN handling / playback death #50

Closed vsariola closed 3 years ago

vsariola commented 3 years ago

Currently, any single NaN in the signal path usually leads to complete audio death, due to the presence of global reverb: NaNs get stuck in the delaylines, causing all future output to be NaNs.

For efficiency reasons, we probably cannot handle NaN checks everywhere in the playback code, but at least we could: 1) Give proper error message and panic when there is NaN, so the user at least knows the reason 2) Look into the most common culprits (waveshaper, invgain) and see if we at least add some optional protections there

vsariola commented 3 years ago

This is probably partially related to #41