这是indexloc提供的服务,不要输入任何密码
Skip to content

AudioParamDescriptor has member constraints that are redundant #2169

@bzbarsky

Description

@bzbarsky

https://webaudio.github.io/web-audio-api/#dictionary-audioparamdescriptor-members describes various constraints on its members. For example, for defaultValue it says:

If this value is out of the range of float data type or the range defined by minValue and maxValue, a NotSupportedError exception MUST be thrown

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions