Skip to content
Closed
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
45 changes: 41 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ <h2 id="BaseAudioContext">
still be created, through <a href=
"#widl-BaseAudioContext-createBuffer-AudioBuffer-unsigned-long-numberOfChannels-unsigned-long-length-float-sampleRate">
createBuffer</a> or <a href=
"#widl-BaseAudioContext-decodeAudioData-Promise-AudioBuffer--ArrayBuffer-audioData-DecodeSuccessCallback-successCallback-DecodeErrorCallback-errorCallback">
"#widl-BaseAudioContext-decodeAudioData-Promise-AudioBuffer--ArrayBuffer-audioData-DecodeSuccessCallback-successCallback-DecodeErrorCallback-errorCallback-DecodeAudioDataOptions-options">
decodeAudioData</a>.)
</dd>
</dl>
Expand Down Expand Up @@ -1179,7 +1179,7 @@ <h2 id="BaseAudioContext">
<code>responseType</code> to <code>"arraybuffer"</code>. Audio
file data can be in any of the formats supported by the
<code>audio</code> element. The buffer passed to <a href=
"#widl-AudioContext-decodeAudioData-Promise-AudioBuffer--ArrayBuffer-audioData-DecodeSuccessCallback-successCallback-DecodeErrorCallback-errorCallback">
"#widl-BaseAudioContext-decodeAudioData-Promise-AudioBuffer--ArrayBuffer-audioData-DecodeSuccessCallback-successCallback-DecodeErrorCallback-errorCallback-DecodeAudioDataOptions-options">
decodeAudioData</a> has its content-type determined by sniffing,
as described in [[mimesniff]].
</p>
Expand All @@ -1205,6 +1205,14 @@ <h2 id="BaseAudioContext">
A callback function which will be invoked if there is an error
decoding the audio file.
</dd>
<dt>
optional DecodeAudioDataOptions options
</dt>
<dd>
Options for <a href=
"#widl-BaseAudioContext-decodeAudioData-Promise-AudioBuffer--ArrayBuffer-audioData-DecodeSuccessCallback-successCallback-DecodeErrorCallback-errorCallback-DecodeAudioDataOptions-options">
decodeAudioData</a>.
</dd>
</dl>
<p>
Although the primary method of interfacing with this function is
Expand Down Expand Up @@ -1286,9 +1294,13 @@ <h2 id="BaseAudioContext">
<li>Otherwise:
<ol>
<li>Take the result, representing the decoded linear PCM
audio data, and resample it to the sample-rate of the
audio data. If <a><code>disableResampling</code></a> is
false, resample it to the sample-rate of the
<a><code>AudioContext</code></a> if it is different from the
sample-rate of <a>audioData</a>.
sample-rate of <a>audioData</a>. Otherwise, resampling is
disabled, and the decoded data is unchanged, with the sample
rate of the <a>AudioBuffer</a> set to the sample rate of the
encoded data.
</li>
<li>Queue a task on the <a>control thread</a>'s event loop to
execute the following steps:
Expand Down Expand Up @@ -1658,6 +1670,31 @@ <h2 id="BaseAudioContext">
The error that occurred while decoding.
</dd>
</dl>
<section>
<h2>
DecodeAudioDataOptions
</h2>
<p>
This dictionary specifies how <a href=
"#widl-BaseAudioContext-decodeAudioData-Promise-AudioBuffer--ArrayBuffer-audioData-DecodeSuccessCallback-successCallback-DecodeErrorCallback-errorCallback-DecodeAudioDataOptions-options">
decodeAudioData</a> should process the encoded audio data to
produce the decoded linear PCM audio.
</p>
<dl title="dictionary DecodeAudioDataOptions" class="idl">
<dt>
boolean disableResampling = false
</dt>
<dd>
Controls whether the decoded audio data returned by <a href=
"#widl-BaseAudioContext-decodeAudioData-Promise-AudioBuffer--ArrayBuffer-audioData-DecodeSuccessCallback-successCallback-DecodeErrorCallback-errorCallback-DecodeAudioDataOptions-options">
decodeAudioData</a> is automatically resampled to the sample rate
of the context. By default, resampling is done. If
<a><code>disableResampling</code></a> is true, resampling is not
done, and the returned <a>AudioBuffer</a> has its sample rate set
to the rate specified by the encoded data.
</dd>
</dl>
</section>
<section>
<h3 id="lifetime-AudioContext" class="informative">
Lifetime
Expand Down