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

AudioNode.channelCount = 0 throws NotSupportedError #480

Closed
rtoy opened this issue Feb 6, 2015 · 4 comments
Closed

AudioNode.channelCount = 0 throws NotSupportedError #480

rtoy opened this issue Feb 6, 2015 · 4 comments

Comments

@rtoy
Copy link
Member

rtoy commented Feb 6, 2015

The spec (https://webaudio.github.io/web-audio-api/#widl-AudioNode-channelCount) says NotSupportedError is thrown. The spec doesn't say, but presumably setting channelCount to be greater than the implementation's maximum number of channels should also throw.

In this case, IndexSizeError seems more appropriate.

@hoch
Copy link
Member

hoch commented Feb 6, 2015

+1

It is not like "we can't do it", it is more like "you shouldn't do it."

@padenot
Copy link
Member

padenot commented Mar 24, 2015

Well, admittedly, when setting it to something greater than the max for one particular implementation, NotSupportedError makes sense, because it possible another implementation supports more channels.

@rtoy
Copy link
Member Author

rtoy commented Mar 24, 2015

Leaving it as NotSupportedError is acceptable to me.

@mdjp mdjp modified the milestone: Uncommitted May 14, 2015
@joeberkovitz
Copy link
Contributor

Resolution: leave as NotSupportedError for zero case, setting channelCount to be greater than the implementation's maximum number of channels should also throw NotSupportedError.

@joeberkovitz joeberkovitz modified the milestones: Web Audio V1, Uncommitted Jun 1, 2015
@rtoy rtoy self-assigned this Jun 17, 2015
padenot added a commit that referenced this issue Jun 18, 2015
Fix #480: channelCount throws NotSupportedError for invalid values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants