Skip to content

Exception for changing channelCount on ScriptProcessorNode does not match browsers #2153

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

Closed
bzbarsky opened this issue Feb 7, 2020 · 1 comment
Assignees

Comments

@bzbarsky
Copy link

bzbarsky commented Feb 7, 2020

https://webaudio.github.io/web-audio-api/#dom-audionode-channelcount says:

ScriptProcessorNode
The channel count cannot be changed, and an InvalidStateError exception
MUST be thrown for any attempt to change the value.

Testcase:

var ctx = new AudioContext
var n = ctx.createScriptProcessor(2048, 3)
try { n.channelCount = 2  } catch (e) { console.log(e.name) }

logs "NotSupportedError" in both Chrome and Firefox.

@bzbarsky bzbarsky added Needs Discussion The issue needs more discussion before it can be fixed. Untriaged labels Feb 7, 2020
@padenot
Copy link
Member

padenot commented Feb 13, 2020

Telconf decision: align this node on all the others, and make it throw "NotSupportedError", which makes more sense.

@rtoy rtoy added Needs Edits Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/ and removed Needs Discussion The issue needs more discussion before it can be fixed. Untriaged labels Feb 13, 2020
rtoy added a commit to rtoy/web-audio-api that referenced this issue Feb 14, 2020
Throw NotSupportedError instead of InvalidStateError when trying to
change the channelCount.
@padenot padenot added In PR Review and removed Needs Edits Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/ labels Feb 18, 2020
@rtoy rtoy closed this as completed in efbcaa8 Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants