This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19854 - AudioContext.createBuffer(chan, len, rate) should accept only non-zero positive values
Summary: AudioContext.createBuffer(chan, len, rate) should accept only non-zero positi...
Status: CLOSED WONTFIX
Alias: None
Product: AudioWG
Classification: Unclassified
Component: Web Audio API (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: TBD
Assignee: Chris Rogers
QA Contact: public-audio
URL:
Whiteboard:
Keywords:
: 19867 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-04 14:46 UTC by Olli Pettay
Modified: 2014-10-28 17:17 UTC (History)
1 user (show)

See Also:


Attachments

Description Olli Pettay 2012-11-04 14:46:50 UTC
Currently one can create useless buffers by passing 
0 as one of the parameter. That should not be allowed, but an
exception should be thrown.
Comment 1 Ehsan Akhgari [:ehsan] 2012-11-05 18:53:59 UTC
*** Bug 19867 has been marked as a duplicate of this bug. ***
Comment 2 Ehsan Akhgari [:ehsan] 2012-11-05 18:54:32 UTC
I think the INDEX_SIZE_ERR exception must be thrown in this case.
Comment 3 Chris Rogers 2012-11-13 21:20:39 UTC
Before I change the spec, can we decide on the exception code for out-of-range sampleRate?  It seems odd to talk in terms of "index" in this case.  What do typed arrays use for zero length?

I'd just like to get all the exception codes in order for createBuffer()...
Comment 4 Ehsan Akhgari [:ehsan] 2012-11-13 22:28:05 UTC
Hmm, we could also use NOT_SUPPORTED_ERR.
Comment 5 Olivier Thereaux 2014-10-28 17:14:13 UTC
Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues
Comment 6 Olivier Thereaux 2014-10-28 17:17:06 UTC
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.