SFXR: Avoid NaNs by making envelope length minimum 1 sample #1879

Closed
wants to merge 3 commits into
from

Projects

None yet

2 participants

@softrabbit
Member

The values in the env_length array are used as divisors, so if they are allowed a range down to 0 the divisions will result in NaN, which propagates through env_vol all the way to ssample, which is the output. This change might remove some minimal amount of "snap" from the sound, but that would in many cases be the sound of some component not liking NaNs.

This should at least partly fix #1877. I'm not saying SFXR doesn't include other calculations that might lead to NaN.

@diizy
Contributor
diizy commented Mar 19, 2015

Since this is a bugfix for a bug that I assume also exists in 1.1, it might be a good idea to rebase this for the stable-1.1 branch?

@softrabbit softrabbit closed this Mar 25, 2015
@softrabbit softrabbit deleted the softrabbit:issue-1877 branch Apr 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment