Mandate a NOT_SUPPORTED_ERR exception when passing invalid arguments to createBuffer
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 23 May 2013 20:43:53 -0400
changeset 317 09f8c94d400f
parent 316 b15dd1c1e82c
child 318 a26cf1cc60d3
Mandate a NOT_SUPPORTED_ERR exception when passing invalid arguments to createBuffer
webaudio/specification.html
--- a/webaudio/specification.html	Wed May 22 17:06:18 2013 -0400
+++ b/webaudio/specification.html	Thu May 23 20:43:53 2013 -0400
@@ -931,8 +931,9 @@
 <dl>
   <dt id="dfn-createBuffer">The <code>createBuffer</code> method</dt>
     <dd><p>Creates an AudioBuffer of the given size. The audio data in the
-      buffer will be zero-initialized (silent).  An exception will be thrown if
-      the <code>numberOfChannels</code> or <code>sampleRate</code> are out-of-bounds.</p>
+      buffer will be zero-initialized (silent).  An NOT_SUPPORTED_ERR exception will be thrown if
+      the <code>numberOfChannels</code> or <code>sampleRate</code> are out-of-bounds,
+      or if length is 0.</p>
       <p>The <dfn id="dfn-numberOfChannels">numberOfChannels</dfn> parameter
       determines how many channels the buffer will have.  An implementation must support at least 32 channels. </p>
       <p>The <dfn id="dfn-length">length</dfn> parameter determines the size of