-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
The sound card allows you to set the frequency of a channel to a negative value, which breaks half the oscillators (state.offset goes deep into negative). Or infinite, breaking the whole channel now. Passing NaN renders the sound card completely mute1.
setVolume seemingly clamps the input to [0, 1]. However, it doesn't check for NaN. So it allows the NaN to propagate throughout the code, poisoning the state and, again, making it unable to produce any sound1.
I believe these methods (as well as many others) would benefit from a more stringent inspection of its floating-point arguments — checking them for finiteness and applicability.
Though negative frequencies would make sense if they would actually work.
Footnotes
Metadata
Metadata
Assignees
Labels
No labels