Skip to content

Commit 49cb551

Browse files
Merge pull request #2657 from mjwilson-google/sample-rate
Require implementations support exactly the inclusive range [3000, 768000] for sample rate
2 parents 9cded07 + a77c6d3 commit 49cb551

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

index.bs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ Methods</h4>
982982
<pre class=argumentdef for="BaseAudioContext/createBuffer()">
983983
numberOfChannels: Determines how many channels the buffer will have. An implementation MUST support at least 32 channels.
984984
length: Determines the size of the buffer in sample-frames. This MUST be at least 1.
985-
sampleRate: Describes the sample-rate of the [=linear PCM=] audio data in the buffer in sample-frames per second. An implementation MUST support sample rates in at least the range 8000 to 96000.
985+
sampleRate: Describes the sample-rate of the [=linear PCM=] audio data in the buffer in sample-frames per second. See [[#sample-rates]] for the required supported range.
986986
</pre>
987987
<div>
988988
<em>Return type:</em> {{AudioBuffer}}
@@ -2362,11 +2362,8 @@ Dictionary {{AudioContextOptions}} Members</h5>
23622362
: <dfn>sampleRate</dfn>
23632363
::
23642364
Set the {{BaseAudioContext/sampleRate}} to this value
2365-
for the {{AudioContext}} that will be created. The
2366-
supported values are the same as the sample rates for an
2367-
{{AudioBuffer}}. <span class="synchronous">A
2368-
{{NotSupportedError}} exception MUST be thrown if
2369-
the specified sample rate is not supported.</span>
2365+
for the {{AudioContext}} that will be created. See
2366+
[[#sample-rates]] for the required supported range.
23702367

23712368
If {{AudioContextOptions/sampleRate}} is not
23722369
specified, the preferred sample rate of the output device for
@@ -2574,7 +2571,7 @@ Constructors</h4>
25742571
<pre class=argumentdef for="OfflineAudioContext/constructor(numberOfChannels, length, sampleRate)">
25752572
numberOfChannels: Determines how many channels the buffer will have. See {{BaseAudioContext/createBuffer()}} for the supported number of channels.
25762573
length: Determines the size of the buffer in sample-frames.
2577-
sampleRate: Describes the sample-rate of the [=linear PCM=] audio data in the buffer in sample-frames per second. See {{BaseAudioContext/createBuffer()}} for valid sample rates.
2574+
sampleRate: Describes the sample-rate of the [=linear PCM=] audio data in the buffer in sample-frames per second. See [[#sample-rates]] for the required supported range.
25782575
</pre>
25792576
</dl>
25802577

@@ -2811,7 +2808,8 @@ Dictionary {{OfflineAudioContextOptions}} Members</h5>
28112808

28122809
: <dfn>sampleRate</dfn>
28132810
::
2814-
The sample rate for this {{OfflineAudioContext}}.
2811+
The sample rate for this {{OfflineAudioContext}}. See
2812+
[[#sample-rates]] for the required supported range.
28152813

28162814
: <dfn>renderSizeHint</dfn>
28172815
::
@@ -3160,7 +3158,7 @@ The allowed values for the members of this dictionary are constrained. See {{Ba
31603158

31613159
: <dfn>sampleRate</dfn>
31623160
::
3163-
The sample rate in Hz for the buffer. See {{BaseAudioContext/createBuffer()/sampleRate}} for constraints.
3161+
The sample rate in Hz for the buffer. See [[#sample-rates]] for the required supported range.
31643162
</dl>
31653163

31663164

@@ -11924,6 +11922,14 @@ events MUST be the same: given two operation <var>A</var> and
1192411922
before <var>B<sub>Async</sub></var>. In other words, synchronous and
1192511923
asynchronous sections can't be reordered.
1192611924

11925+
<h3 id="sample-rates">Supported Sample Rates</h3>
11926+
11927+
<p>
11928+
Implementations MUST support sample rates between 3000 Hz and 768000 Hz,
11929+
inclusive. A {{NotSupportedError}} MUST be thrown if a sample rate outside this
11930+
range is specified.
11931+
</p>
11932+
1192711933
<h3 id="rendering-loop">
1192811934
Rendering an Audio Graph</h3>
1192911935

0 commit comments

Comments
 (0)