Skip to content

Commit a3903a7

Browse files
padenotrtoy
authored andcommitted
Specify rules to determine the output channel count for AudioNodes that have a tail time, when the input channel count changes.
This fixes WebAudio#1719.
1 parent ea0e56e commit a3903a7

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

index.bs

+29
Original file line numberDiff line numberDiff line change
@@ -11290,6 +11290,35 @@ defined below, skipping over those channels not present.
1129011290
<tr><td>17 <td>SPEAKER_TOP_BACK_RIGHT <td> <td> <td> <td>
1129111291
</table>
1129211292

11293+
<h3 id="channels-tail-time">
11294+
Implication of tail-time on input and output channel count</h3>
11295+
11296+
When an {{AudioNode}} has a non-null <a>tail-time</a>, and an output channel
11297+
count that depends on the input channels count, any change in input channel
11298+
count MUST take into account the {{AudioNode}}'s <a>tail-time</a>.
11299+
11300+
When there is a decrease in input channel count, the change in output channel
11301+
count MUST happen after the <a>tail-time</a> has passed.
11302+
11303+
When there is an increase in input channel count, the behavious depends on the
11304+
{{AudioNode}} type:
11305+
11306+
- For a {{ConvolverNode}}, since the number of input channel determines the
11307+
<a href="#Convolution-channel-configurations"> audio processing algorithm </a>
11308+
to use, it MUST immediately start outputing two channels.
11309+
11310+
Note: this only applies to the case where the {{ConvolverNode}}'s impulse
11311+
response is mono. Otherwise, the {{ConvolverNode}} always outputs a stereo
11312+
signal regardless of its input channel count.
11313+
11314+
- For other {{AudioNode}}s that have a <a>tail-time</a>, the number of output
11315+
channels MUST increase after the <a>tail-time</a> has passed.
11316+
11317+
Note: Intuitively, this allows not losing stereo information as part of
11318+
processing: when multiple audio blocks of different channel count contribute to
11319+
an output block, then the output block's channel count is a superset of the
11320+
input channel count of the input blocks.
11321+
1129311322
<h3 id="UpMix-sub">
1129411323
Up Mixing Speaker Layouts</h3>
1129511324

0 commit comments

Comments
 (0)