diff --git a/index.bs b/index.bs index 9fb7f133d..2e5930f46 100644 --- a/index.bs +++ b/index.bs @@ -2381,6 +2381,8 @@ Dictionary {{AudioContextOptions}} Members "default" is passed, or to ask the User-Agent to pick a good render quantum size if "hardware" is specified. + See [[#render-quantum-sizes]] for the required supported range. + It is a hint that might not be honored. @@ -2508,16 +2510,20 @@ Constructors 1. Set the {{[[rendering thread state]]}} for |c| to "suspended". - 1. Determine the {{[[render quantum size]]}} for this {{OfflineAudioContext}}, - based on the value of the {{OfflineAudioContextOptions/renderSizeHint}}: + 1. Set the {{BaseAudioContext/sampleRate}} for |c|, + based on the value of contextOptions.{{OfflineAudioContextOptions/sampleRate}}. + + 1. Determine the {{[[render quantum size]]}} for |c|, + based on the value of the contextOptions.{{OfflineAudioContextOptions/renderSizeHint}}: 1. If it has the default value of "default" or "hardware", set the {{[[render quantum size]]}} private slot to 128. - 1. Else, if an integer has been passed, the User-Agent can decide to - honour this value by setting it to the {{[[render quantum size]]}} - private slot. + 1. Else, if an integer has been passed, a {{NotSupportedError}} MUST be + thrown if the value is outside the range specified in + [[#render-quantum-sizes]], otherwise set the {{[[render quantum size]]}} + private slot to the passed value. 1. Construct an {{AudioDestinationNode}} with its {{AudioNode/channelCount}} set to @@ -2814,7 +2820,8 @@ Dictionary {{OfflineAudioContextOptions}} Members : renderSizeHint :: A hint for the render quantum size of this - {{OfflineAudioContext}}. + {{OfflineAudioContext}}. See [[#render-quantum-sizes]] + for the required supported range.

@@ -11943,6 +11950,25 @@ inclusive. A {{NotSupportedError}} MUST be thrown if a sample rate outside this range is specified.

+

Supported Render Quantum Sizes

+ +

+Implementations MUST support {{BaseAudioContext/[[render quantum +size]]}} between 1 sample frame and 6 times the context sample rate, +inclusive, rounding down to the nearest integer if 6 times the context +sample rate is not an integer. A {{NotSupportedError}} MUST be thrown +if a {{BaseAudioContext/[[render quantum size]]}} outside this range +is specified. +

+ +
+Note: the upper limit of 6 seconds was chosen to support applications +using the deprecated {{ScriptProcessorNode}} interface at its highest +buffer size of 16384 and the lowest supported sample rate of 3000 Hz. +For a context sample rate of 3000 Hz the supported range is [1, +18000]. Higher sample rates will have a higher upper bound. +
+

Rendering an Audio Graph