We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This line causes randomState to be Infinity after a few iterations.
randomState
Infinity
this.randomState *= 1664525 + 1013904223;
~ https://github.com/audiocogs/aac.js/blob/master/src/ics.js#L234
A few lines later these "random" values will be multiplied with a scale factor of -0 (because energy is Infinity as well), resulting in NaN.
-0
energy
NaN
Proposed fix, cast it to an integer:
this.randomState = (this.randomState * (1664525 + 1013904223))|0;
The text was updated successfully, but these errors were encountered:
Sounds good, can you make a pull request?
Sorry, something went wrong.
Merge pull request #11 from phoboslab/patch-1
29b02b6
Fix random noise generator, see #10
No branches or pull requests
This line causes
randomState
to beInfinity
after a few iterations.~ https://github.com/audiocogs/aac.js/blob/master/src/ics.js#L234
A few lines later these "random" values will be multiplied with a scale factor of
-0
(becauseenergy
isInfinity
as well), resulting inNaN
.Proposed fix, cast it to an integer:
The text was updated successfully, but these errors were encountered: