Move the channel count attributes to AudioNode
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 02 Apr 2013 15:32:51 -0400
changeset 278 f618876c86ce
parent 277 d666a17c340c
child 279 827140b23ed9
Move the channel count attributes to AudioNode

This fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=21540.
webaudio/specification.html
--- a/webaudio/specification.html	Tue Apr 02 15:09:39 2013 -0400
+++ b/webaudio/specification.html	Tue Apr 02 15:32:51 2013 -0400
@@ -1290,6 +1290,17 @@
 <div class="blockContent">
 <pre class="code"><code class="idl-code">
 
+enum <dfn>ChannelCountMode</dfn> {
+    “max”,
+    “clamped-max”,
+    “explicit”
+};
+
+enum <dfn>ChannelInterpretation</dfn> {
+    “speakers”,
+    “discrete”
+};
+
 interface <dfn id="dfn-AudioNode">AudioNode</dfn> : EventTarget {
 
     void connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
@@ -1300,6 +1311,11 @@
     readonly attribute unsigned long numberOfInputs;
     readonly attribute unsigned long numberOfOutputs;
 
+    // Channel up-mixing and down-mixing rules for all inputs.
+    attribute unsigned long channelCount;
+    attribute ChannelCountMode channelCountMode;
+    attribute ChannelInterpretation channelInterpretation;
+
 };
 </code></pre>
 </div>
@@ -1324,6 +1340,28 @@
       for an AudioDestinationNode.</p>
     </dd>
 </dl>
+<dl>
+  <dt id="dfn-channelCount"><code>channelCount</code><dt>
+    <dd><p>The number of channels for the node.  The default value is 2.</p>
+      <p>See the <a href="#UpMix-section">Channel up-mixing and down-mixing</a>
+        section below for more information on this attriubte.</p>
+    </dd>
+</dl>
+<dl>
+  <dt id="dfn-channelCountMode"><code>channelCountMode</code><dt>
+    <dd><p>Determines how the channel count used for up-mixing and down-mixing
+      is computed.</p>
+      <p>See the <a href="#UpMix-section">Channel up-mixing and down-mixing</a>
+        section below for more information on this attriubte.</p>
+    </dd>
+</dl>
+<dl>
+  <dt id="dfn-channelInterpretation"><code>channelInterpretation</code><dt>
+    <dd><p>Determines how individual channels will be treated.</p>
+      <p>See the <a href="#UpMix-section">Channel up-mixing and down-mixing</a>
+        section below for more information on this attriubte.</p>
+    </dd>
+</dl>
 </div>
 
 <div id="methodsandparams-AudioNode-section" class="section">
@@ -4095,37 +4133,14 @@
  representing the actual number of channels of the input at any given time:
 </p>
 
-<div class="block">
-<div class="blockTitleDiv">
-<div class="blockContent">
-<pre class="code"><code class="idl-code"> 
-enum <dfn>ChannelCountMode</dfn> {
-    “max”,
-    “clamped-max”,
-    “explicit”
-};
-
-enum <dfn>ChannelInterpretation</dfn> {
-    “speakers”,
-    “discrete”
-};
-
-partial interface <dfn>AudioNode</dfn> {
-
-    // Channel up-mixing and down-mixing rules for all inputs.
-    attribute unsigned long channelCount;
-    attribute ChannelCountMode channelCountMode;
-    attribute ChannelInterpretation channelInterpretation;
-
-};
-</code></pre>
-</div>
-</div>
-</div>
-
+<p>
+The AudioNode attributes involved in channel up-mixing and down-mixing rules are defined
+<a href="#attributes-AudioNode-section">above</a>.  The following is a more precise specification
+on what each of them mean.
+</p>
 
 <ol>
-<li><dfn>channelCount</dfn> is used to help compute <dfn>computedNumberOfChannels</dfn>.  Its default value is 2.</li>
+<li><dfn>channelCount</dfn> is used to help compute <dfn>computedNumberOfChannels</dfn>.</li>
 
 <li><dfn>channelCountMode</dfn> determines how <dfn>computedNumberOfChannels</dfn> will be computed.
 Once this number is computed, all of the connections will be up or down-mixed to that many channels.  For most nodes,