Skip to content
New issue

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

setValueCurveAtTime should throw if the curve has non-finite values #815

Closed
rtoy opened this issue May 18, 2016 · 4 comments
Closed

setValueCurveAtTime should throw if the curve has non-finite values #815

rtoy opened this issue May 18, 2016 · 4 comments
Labels
Needs Edits Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/
Milestone

Comments

@rtoy
Copy link
Member

rtoy commented May 18, 2016

We don't explicitly say it but invalid values such as NaN or Infinity in the curve for setValueCurveAtTime should throw an exception. We don't allow such values in the AudioParam value setter or any of the other automation methods.

(Is there a WebIDL way to constrain the values of the elements of an array? That would be ideal.)

@mdjp mdjp added the Needs Edits Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/ label May 19, 2016
@mdjp mdjp added this to the Web Audio V1 milestone May 19, 2016
@mdjp
Copy link
Member

mdjp commented May 19, 2016

Agreed.

@padenot
Copy link
Member

padenot commented May 23, 2016

I'm asking around, will follow up.

@padenot
Copy link
Member

padenot commented May 24, 2016

In light of whatwg/webidl#126 I suggest we simply convert the signature to sequence<float> and let WebIDL deal with the problem.

@rtoy
Copy link
Member Author

rtoy commented May 24, 2016

I'm fine with that because it's a lot easier to use interactively. Perhaps this is a bug in chrome's idl but createIIRFilter([1, NaN], [1, Infinity]) signals only because the internal implementation manually checks for non-finite numbers.

hoch pushed a commit to hoch/web-audio-api that referenced this issue Jun 29, 2016
If the curve contains non-finite values, setValueCurveAtTime must
signal a TypeError.  These values are illegal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Edits Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/
Projects
None yet
Development

No branches or pull requests

3 participants