Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove page macro use in AudioContext #4851

Merged
merged 1 commit into from
May 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions files/en-us/web/api/audiocontext/audiocontext/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@

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

<pre class="brush: js">var <em>audioCtx</em> = new AudioContext();
var <em>audioCtx</em> = new AudioContext(<em>options</em>);
</pre>
<pre class="brush: js">new AudioContext();
new AudioContext(options);</pre>

<h3 id="Parameters">Parameters</h3>

<dl>
<dt><code>options</code> {{optional_inline}}</dt>
<dd>An object based on the {{domxref("AudioContextOptions")}} dictionary that contains
zero or more optional properties to configure the new context. Available properties
are as follows: {{page("/en-US/docs/Web/API/AudioContextOptions", "Properties")}}</dd>
zero or more optional properties to configure the new context (see dictionary for details of the available properties).</dd>
sideshowbarker marked this conversation as resolved.
Show resolved Hide resolved
</dl>

<h3 id="Return_value">Return value</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Web Audio API
- latency
---
<div>{{APIRef("Web Audio API")}}{{draft}}</div>
<div>{{APIRef("Web Audio API")}}</div>
sideshowbarker marked this conversation as resolved.
Show resolved Hide resolved

<p><span class="seoSummary">The <code><strong>AudioContextLatencyCategory</strong></code> type is an enumerated set of strings which are used to select one of a number of default values for acceptable maximum latency of an audio context.</span> By using these strings rather than a numeric value when specifying a latency to a {{domxref("AudioContext")}}, you can allow the {{Glossary("user agent")}} to select an appropriate latency for your use case that makes sense on the device on which your content is being used.</p>

Expand Down
5 changes: 2 additions & 3 deletions files/en-us/web/api/audiocontextoptions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ <h2 id="Constants">Constants</h2>

<h3 id="Standard_values_for_latencyHint">Standard values for latencyHint</h3>

<p>The {{domxref("AudioContextOptions.latencyHint", "latencyHint")}} property can be number specifying a preferred maximum latency in seconds or a string from the {{domxref("AudioContextLatencyCategory")}} enumerated string, which selects a standard value for a given type of audio usage:</p>

<p>{{page("/en-US/docs/Web/API/AudioContextLatencyCategory", "Values")}}</p>
<p><em>Standard</em> values for the {{domxref("AudioContextOptions.latencyHint", "latencyHint")}} property are provided in the {{domxref("AudioContextLatencyCategory")}} enumerated string. These select an appropriate value for a given type of audio usage, e.g. <code>"balanced"</code>, <code>"interactive"</code> or <code>"playback"</code>.
You can also specify a preferred maximum latency in seconds.</p>
sideshowbarker marked this conversation as resolved.
Show resolved Hide resolved

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h3 id="Value">Value</h3>
<p>The preferred maximum latency for the <code>AudioContext</code>. There are two ways
this value can be specified.</p>

<p>The best way to specify the preferred latency is to use a value form the string enum
<p>The best way to specify the preferred latency is to use a value from the string enum
{{domxref("AudioContextLatencyCategory")}}. In fact, the default value of
<code>latencyHint</code> is <code>"interactive"</code> (meaning the browser should try
to use the lowest possible and reliable latency it can).</p>
Expand Down