Skip to content

Commit

Permalink
AudioNode.ChannelInterpretation: remove page macro (#5236)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee authored May 28, 2021
1 parent 0d08531 commit d9c4fbb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
38 changes: 18 additions & 20 deletions files/en-us/web/api/audionode/channelinterpretation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,36 @@
- Reference
- Web Audio API
- channelInterpretation
browser-compat: api.AudioNode.channelInterpretation
---
<p>{{ APIRef("Web Audio API") }}</p>

<p>The <strong><code>channelInterpretation</code></strong> property of the {{ domxref("AudioNode") }} interface represents an enumerated value describing the meaning of the channels. This interpretation will define how audio <a href="/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing">up-mixing and down-mixing</a> will happen.</p>
<p>The <strong><code>channelInterpretation</code></strong> property of the {{domxref("AudioNode")}} interface represents an enumerated value describing how input channels are mapped to output channels when the number of inputs/outputs is different. For example, this setting defines how a mono input will be up-mixed to a stereo or 5.1 channel output, or how a quad channel input will be down-mixed to a stereo or mono output.</p>

<p>The property has two options: <code>speakers</code> and <code>discrete</code>. These are documented in <a href="/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing">Basic concepts behind Web Audio API > up-mixing and down-mixing</a>.</p>

<p>{{page("/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API","Up-mixing and down-mixing")}}</p>

<h2 id="Syntax">Syntax</h2>

<pre class="brush: js;highlight[2]">var oscillator = audioCtx.createOscillator();
<pre class="brush: js">var oscillator = audioCtx.createOscillator();
oscillator.channelInterpretation = 'discrete';</pre>

<h3 id="Value">Value</h3>

<p>An enumerated value representing a <a href="https://webaudio.github.io/web-audio-api/#idl-def-ChannelInterpretation">channelInterpretation</a>.</p>
<p>The values are documented in <a href="/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing">Basic concepts behind Web Audio API > up-mixing and down-mixing</a>.</p>

<p>In summary:</p>
<dl>
<dt><code>speakers</code></dt>
<dd>Use set of "standard" mappings for combinations of common speaker input and outputs setups (mono, stereo, quad, 5.1). For example, with this setting a mono channel input will output to both channels of a stereo output.</dd>
<dt><code>discrete</code></dt>
<dd>Input channels are mapped to output channels in order. If there are more inputs that outputs the additional inputs are dropped; if there are fewer then the unused outputs are silent.</dd>
</dl>


<h2 id="Example">Example</h2>

<pre class="brush: js;highlight[11]">var AudioContext = window.AudioContext || window.webkitAudioContext;
<pre class="brush: js">var AudioContext = window.AudioContext || window.webkitAudioContext;

var audioCtx = new AudioContext();

Expand All @@ -41,24 +52,11 @@ <h2 id="Example">Example</h2>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('Web Audio API', '#dom-audionode-channelinterpretation', 'channelInterpretation')}}</td>
<td>{{Spec2('Web Audio API')}}</td>
<td></td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{Compat("api.AudioNode.channelInterpretation")}}</p>
<p>{{Compat}}</p>

<h2 id="See_also">See also</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,13 @@ <h2 id="Visualizations">Visualizations</h2>

<dl>
<dt>{{domxref("AnalyserNode.getFloatFrequencyData()")}}</dt>
<dd>Copies the current frequency data into a {{domxref("Float32Array")}} array passed into it.</dd>
<dd>Copies the current frequency data into a {{jsxref("Float32Array")}} array passed into it.</dd>
<dt>{{domxref("AnalyserNode.getByteFrequencyData()")}}</dt>
<dd>Copies the current frequency data into a {{domxref("Uint8Array")}} (unsigned byte array) passed into it.</dd>
<dd>Copies the current frequency data into a {{jsxref("Uint8Array")}} (unsigned byte array) passed into it.</dd>
<dt>{{domxref("AnalyserNode.getFloatTimeDomainData()")}}</dt>
<dd>Copies the current waveform, or time-domain, data into a {{domxref("Float32Array")}} array passed into it.</dd>
<dd>Copies the current waveform, or time-domain, data into a {{jsxref("Float32Array")}} array passed into it.</dd>
<dt>{{domxref("AnalyserNode.getByteTimeDomainData()")}}</dt>
<dd>Copies the current waveform, or time-domain, data into a {{domxref("Uint8Array")}} (unsigned byte array) passed into it.</dd>
<dd>Copies the current waveform, or time-domain, data into a {{jsxref("Uint8Array")}} (unsigned byte array) passed into it.</dd>
</dl>

<div class="note">
Expand Down

0 comments on commit d9c4fbb

Please sign in to comment.