Skip to content
Merged
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
18 changes: 8 additions & 10 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3116,19 +3116,17 @@ Constructors</h4>
<div algorithm="new AudioBuffer()">
1. <span class="synchronous">If any of the values in {{AudioBuffer/constructor()/options!!argument}} lie outside its nominal range, throw a {{NotSupportedError}} exception and abort the following steps.</span>

1. Let <var>b</var> be a new {{AudioBuffer}} object.
1. Respectively assign the values of the attributes
1. Respectively assign the values of the members
{{AudioBufferOptions/numberOfChannels}}, {{AudioBufferOptions/length}},
{{AudioBufferOptions/sampleRate}} of the {{AudioBufferOptions}} passed
in the constructor to the internal slots {{[[number of channels]]}}, {{[[length]]}}, {{[[sample rate]]}}.
{{AudioBufferOptions/sampleRate}} of {{AudioBuffer/constructor()/options!!argument}}
to [=this=]'s internal slots {{[[number of channels]]}}, {{[[length]]}}, {{[[sample rate]]}}.

1. Set the internal slot {{[[internal data]]}} of this
{{AudioBuffer}} to the result of calling <code><a href="https://tc39.github.io/ecma262/#sec-createbytedatablock">
CreateByteDataBlock</a>({{[[length]]}} * {{[[number of channels]]}})</code>.
1. Set [=this=]'s {{[[internal data]]}} to the result of calling
<code><a href="https://tc39.es/ecma262/#sec-createbytedatablock">
CreateByteDataBlock</a>({{[[length]]}} * {{[[number of channels]]}} * 4)</code>.

Note: This initializes the underlying storage to zero.

1. Return <var>b</var>.
Note: This initializes the underlying storage to zero. Each
sample is a 32-bit float, i.e. 4 bytes.
</div>
<pre class=argumentdef for="AudioBuffer/constructor()">
options: An {{AudioBufferOptions}} that determine the properties for this {{AudioBuffer}}.
Expand Down
Loading