Remove the synchronous createBuffer function from the spec
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 08 Jul 2013 17:32:25 -0400
changeset 325 28a38310adae
parent 324 649d50bf073e
child 326 4f8714b58ef1
Remove the synchronous createBuffer function from the spec
webaudio/specification.html
--- a/webaudio/specification.html	Thu Jul 04 21:00:14 2013 -0400
+++ b/webaudio/specification.html	Mon Jul 08 17:32:25 2013 -0400
@@ -846,8 +846,6 @@
 
     AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long length, float sampleRate);
 
-    AudioBuffer? createBuffer(ArrayBuffer buffer, boolean mixToMono);
-
     void decodeAudioData(ArrayBuffer audioData,
                          DecodeSuccessCallback successCallback,
                          optional DecodeErrorCallback errorCallback);
@@ -944,45 +942,12 @@
     </dd>
 </dl>
 <dl>
-  <dt id="dfn-createBuffer_2">The <code>createBuffer</code> from ArrayBuffer
-  method</dt>
-    <dd><p>Creates an AudioBuffer given the audio file data contained in the
-      ArrayBuffer. The ArrayBuffer can, for example, be loaded from an XMLHttpRequest's
-        <code>response</code> attribute after setting the <code>responseType</code> to "arraybuffer".
-         Audio file data can be in any of the
-        formats supported by the <code>audio</code> element.</p>
-      <p>The <dfn id="dfn-buffer">buffer</dfn> parameter contains the audio
-      file data (for example from a .wav file). </p>
-      <p>The <dfn id="dfn-mixToMono">mixToMono</dfn> parameter determines if a
-      mixdown to mono will be performed. Normally, this would not be set. </p>
-
-      <p>
-      The following steps must be performed:
-      </p>
-      <ol>
-      <li>Decode the encoded <dfn>buffer</dfn> from the AudioBuffer into linear PCM.
-      If a decoding error is encountered due to the audio format not being recognized or supported, or
-      because of corrupted/unexpected/inconsistent data then return NULL (and these steps will be terminated).</li>
-      <li>If <dfn>mixToMono</dfn> is true, then mixdown the decoded linear PCM data to mono.
-      </li>
-      <li>Take the decoded (possibly mixed-down) linear PCM audio data,
-      and resample it to the sample-rate of the AudioContext if it is different from the sample-rate
-      of <dfn>buffer</dfn>.  The final result will be stored
-      in an AudioBuffer and returned as the result of this method.
-      </li>
-      </ol>
-    </dd>
-</dl>
-<dl>
   <dt id="dfn-decodeAudioData">The <code>decodeAudioData</code> method</dt>
     <dd><p>Asynchronously decodes the audio file data contained in the
       ArrayBuffer. The ArrayBuffer can, for example, be loaded from an XMLHttpRequest's
       <code>response</code> attribute after setting the <code>responseType</code> to "arraybuffer".
        Audio file data can be in any of the
       formats supported by the <code>audio</code> element. </p>
-      <p>The decodeAudioData() method is preferred over the createBuffer() from
-      ArrayBuffer method because it is asynchronous and does not block the main
-      JavaScript thread. </p>
       <p><dfn id="dfn-audioData">audioData</dfn> is an ArrayBuffer containing
       audio file data.</p>
       <p><dfn id="dfn-successCallback">successCallback</dfn> is a callback