-
Notifications
You must be signed in to change notification settings - Fork 167
AudioWorkletNodeOptions.processorOptions should not default to null. #2011
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
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
The setup code: const node = new AudioWorkletNode(context, 'processor', nodeOptions); class extends AudioWorkletProcessor {
constructor(options){
console.log(options);
}
} When {numberOfInputs: 1, numberOfOutputs:1} When {numberOfInputs: 1, numberOfOutputs:1} When {numberOfInputs: 1, numberOfOutputs:1, processorOptions: {foo:'bar'}} |
From WG Telecon: |
I'm not aware of any benefit in If the value could default to the empty object, then that would permit clients to test for members without throwing a TypeError when So, yes, the proposed change seems the best option available. |
Substitute checking `options.processorOptions.<property>` for `options.<property>` WebAudio/web-audio-api#2011; `this._recordChannelCount` for `input.length` to avoid `cannot read length of undefined` error when `input.length` is greater than `this._recordChannelCount`
Describe the issue
Because it is defaulting to
null
, the processor always getnull
for the field even the main scope option object is undefined. We should make it a plain object.Where Is It
https://webaudio.github.io/web-audio-api/#dictdef-audioworkletnodeoptions
The text was updated successfully, but these errors were encountered: