You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
By this I mean the sound card will no longer generate any output no matter what methods you try to call. Removing the card and installing it again also seems to have no effect. The card is effectively bricked this way. ↩↩2
The text was updated successfully, but these errors were encountered:
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. PassingNaN
renders the sound card completely mute1.setVolume
seemingly clamps the input to[0, 1]
. However, it doesn't check forNaN
. So it allows theNaN
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
By this I mean the sound card will no longer generate any output no matter what methods you try to call. Removing the card and installing it again also seems to have no effect. The card is effectively bricked this way. ↩ ↩2
The text was updated successfully, but these errors were encountered: