Basic description of OfflineAudioContext
authorcrogers
Sun, 09 Dec 2012 17:13:56 -0800
changeset 241 1b7da9774098
parent 240 00b58322aa11
child 242 5a7fc6db53c0
Basic description of OfflineAudioContext
webaudio/specification.html
--- a/webaudio/specification.html	Fri Dec 07 12:38:48 2012 -0800
+++ b/webaudio/specification.html	Sun Dec 09 17:13:56 2012 -0800
@@ -150,6 +150,9 @@
           <li><a href="#lifetime-AudioContext">4.1.3. Lifetime</a></li>
         </ul>
       </li>
+      <li><a href="#OfflineAudioContext-section">4.1b. The OfflineAudioContext Interface</a> 
+      </li>
+
       <li><a href="#AudioNode-section">4.2. The AudioNode Interface</a> 
         <ul>
           <li><a href="#attributes-AudioNode">4.2.1. Attributes</a></li>
@@ -1166,6 +1169,46 @@
 
 
 
+<div id="OfflineAudioContext-section-section" class="section">
+<h2 id="OfflineAudioContext-section">4.1b. The OfflineAudioContext Interface</h2>
+<p>
+OfflineAudioContext is a particular type of AudioContext for rendering/mixing-down (potentially) faster than real-time.
+It does not render to the audio hardware, but instead renders as quickly as possible, calling a render callback function upon completion
+with the result provided as an AudioBuffer.  It is constructed by specifying the <dfn>numberOfChannels</dfn>, <dfn>length</dfn>, and <dfn>sampleRate</dfn>
+as follows:
+</p>
+
+<pre>
+var offlineContext = new OfflineAudioContext(unsigned long numberOfChannels, unsigned long length, float sampleRate);
+</pre>
+
+<br>
+
+<p>
+</p>
+
+<div class="block">
+
+<div class="blockTitleDiv">
+<span class="blockTitle">Web IDL</span></div>
+
+<div class="blockContent">
+<pre class="code"><code class="idl-code">
+callback OfflineRenderSuccessCallback = void (AudioBuffer renderedData);
+
+[Constructor]
+interface <dfn id="dfn-OfflineAudioContext">OfflineAudioContext</dfn> : AudioContext {
+
+    void startRendering();
+    
+    attribute OfflineRenderSuccessCallback oncomplete;
+
+};
+</code></pre>
+</div>
+</div>
+
+
 <div id="AudioNode-section-section" class="section">
 <h2 id="AudioNode-section">4.2. The AudioNode Interface</h2>