-
Notifications
You must be signed in to change notification settings - Fork 166
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
AudioParamDescriptor has member constraints that are redundant #2169
Comments
Teleconf: Yes, these need to be fixed. |
So basically:
For the latter two, just remove the error conditions from I kind of like that here, but two places saying the same thing is bad. If we remove these, we should link to the appropriate steps in the algorithm for the constraints. Otherwise, most devs will probably never find the constraints without lots of digging. |
I think so yes. |
On the other hand, should we keep the constraints in AudioParamDescriptor dictionary (which is where the user sets the various attributes) and remove the checks from the registerProcessor algorithm? |
The place where the checks actually end up needing to happen is in the |
Ok. I'll update them then. Thanks. |
The constraings in the members of the `AudioParamDescriptor` are removed. We replace that with a link to the steps in `registerProcessor` algorithm that describes how to handle the descriptor. Updated the algorithm to include a step to throw an error if `minValue` is greater than `maxValue`.
https://webaudio.github.io/web-audio-api/#dictionary-audioparamdescriptor-members describes various constraints on its members. For example, for
defaultValue
it says:That first constraint is redundant with the fact that it's declared as
float
in the IDL: the algorithm at https://heycam.github.io/webidl/#es-to-float will already throw on out-of-range values, before any of this spec's logic happens. So it can just be removed.The second constraint is redundant with https://webaudio.github.io/web-audio-api/#dom-audioworkletglobalscope-registerprocessor step 9 (though I took a look at the Blink code and I don't see it being enforced either in their version of step 7 or in step 9; I might have missed it, of course).
Similar for the other constraints here, including the one on "name"; that's enforced by https://webaudio.github.io/web-audio-api/#dom-audioworkletglobalscope-registerprocessor step 9 too.
@padenot
The text was updated successfully, but these errors were encountered: