Skip to content

Commit f905cf3

Browse files
gabrielsanbritohoch
authored andcommitted
Addressing formatting feedback
1 parent b4798cc commit f905cf3

1 file changed

Lines changed: 31 additions & 48 deletions

File tree

index.bs

Lines changed: 31 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,8 +1249,7 @@ Methods</h4>
12491249
2. Reject <var>promise</var> with <var>error</var>, and remove it from
12501250
{{BaseAudioContext/[[pending promises]]}}.
12511251

1252-
3. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
1253-
Queue a media element task</a> to invoke
1252+
3. [=Queue a media element task=] to invoke
12541253
{{BaseAudioContext/decodeAudioData()/errorCallback!!argument}} with |error|.
12551254

12561255
5. Return <var>promise</var>.
@@ -1286,8 +1285,7 @@ Methods</h4>
12861285
[[WEBCODECS]].
12871286

12881287
4. If |can decode| is `false`,
1289-
<a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
1290-
queue a media element task</a> to execute the following steps:
1288+
[=Queue a media element task=] to execute the following steps:
12911289

12921290
1. Let <var>error</var> be a <code>DOMException</code>
12931291
whose name is {{EncodingError}}.
@@ -1307,8 +1305,7 @@ Methods</h4>
13071305
the sample-rate of {{BaseAudioContext/decodeAudioData(audioData,
13081306
successCallback, errorCallback)/audioData!!argument}}.
13091307

1310-
2. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
1311-
queue a media element task</a> to execute the following steps:
1308+
2. [=Queue a media element task=] to execute the following steps:
13121309

13131310
1. Let <var>buffer</var> be an
13141311
{{AudioBuffer}} containing the final result
@@ -1811,15 +1808,13 @@ Methods</h4>
18111808
There is no need to notify the control thread in this case.
18121809
</div>
18131810

1814-
4. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
1815-
queue a media element task</a> to execute the following steps:
1811+
4. [=Queue a media element task=] to execute the following steps:
18161812

18171813
1. Resolve <em>promise</em>.
18181814
2. If the {{BaseAudioContext/state}} attribute of the {{AudioContext}} is not already "{{AudioContextState/closed}}":
18191815
1. Set the {{BaseAudioContext/state}} attribute of the {{AudioContext}} to "{{AudioContextState/closed}}".
18201816

1821-
1. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
1822-
queue a media element task</a> to <a spec="dom" lt="fire an event">fire
1817+
1. [=Queue a media element task=] to <a spec="dom" lt="fire an event">fire
18231818
an event</a> named {{BaseAudioContext/statechange}} at the {{AudioContext}}.
18241819
</div>
18251820

@@ -1969,39 +1964,39 @@ Methods</h4>
19691964

19701965
1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=fully active=] then return [=a promise rejected with=] "{{InvalidStateError}}" {{DOMException}}.
19711966

1972-
2. Let <var>promise</var> be a new Promise.
1967+
1. Let <var>promise</var> be a new Promise.
19731968

1974-
3. If the {{[[control thread state]]}} on the
1969+
1. If the {{[[control thread state]]}} on the
19751970
{{AudioContext}} is <code>closed</code> reject the
19761971
promise with {{InvalidStateError}}, abort these steps,
19771972
returning <var>promise</var>.
19781973

1979-
4. Set {{[[suspended by user]]}} to <code>false</code>.
1974+
1. Set {{[[suspended by user]]}} to <code>false</code>.
19801975

1981-
5. If the {{[[control thread state]]}} on the
1976+
1. If the {{[[control thread state]]}} on the
19821977
{{AudioContext}} is <code>suspended</code> and there is an ongoing [=interruption=]:
19831978

19841979
1. Queue a media element task</a> to execute the following steps:
19851980

19861981
1. Set the {{BaseAudioContext/state}} attribute of the {{AudioContext}} to "{{AudioContextState/interrupted}}".
19871982

1988-
2. [=Queue a media element task=] to [=fire an event=] named
1983+
1. [=Queue a media element task=] to [=fire an event=] named
19891984
{{BaseAudioContext/statechange}} at the {{AudioContext}}.
19901985

1991-
2. Reject the promise with {{InvalidStateError}}, abort these steps,
1986+
1. Reject the promise with {{InvalidStateError}}, abort these steps,
19921987
returning <var>promise</var>.
19931988

1994-
6. If the context is not <a>allowed to start</a>, append
1989+
1. If the context is not <a>allowed to start</a>, append
19951990
<var>promise</var> to {{BaseAudioContext/[[pending promises]]}} and
19961991
{{AudioContext/[[pending resume promises]]}} and abort these steps, returning
19971992
<var>promise</var>.
19981993

1999-
7. Set the {{[[control thread state]]}} on the
1994+
1. Set the {{[[control thread state]]}} on the
20001995
{{AudioContext}} to <code>running</code>.
20011996

2002-
8. <a>Queue a control message</a> to resume the {{AudioContext}} with <var>promise</var>.
1997+
1. <a>Queue a control message</a> to resume the {{AudioContext}} with <var>promise</var>.
20031998

2004-
9. Return <var>promise</var>.
1999+
1. Return <var>promise</var>.
20052000
</div>
20062001

20072002
<div id="context-resume" algorithm="run a control message in AudioContext">
@@ -2018,17 +2013,15 @@ Methods</h4>
20182013
3. Start <a href="#rendering-loop">rendering the audio graph</a>.
20192014

20202015
4. In case of failure,
2021-
<a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2022-
queue a media element task</a> to execute the following steps:
2016+
[=Queue a media element task=] to execute the following steps:
20232017

20242018
1. Reject all promises from {{AudioContext/[[pending resume promises]]}}
20252019
in order, then clear {{AudioContext/[[pending resume promises]]}}.
20262020

20272021
2. Additionally, remove those promises from {{BaseAudioContext/[[pending
20282022
promises]]}}.
20292023

2030-
5. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2031-
queue a media element task</a> to execute the following steps:
2024+
5. [=Queue a media element task=] to execute the following steps:
20322025

20332026
1. Resolve all promises from {{AudioContext/[[pending resume promises]]}} in order.
20342027
1. Clear {{AudioContext/[[pending resume promises]]}}. Additionally, remove those
@@ -2102,8 +2095,7 @@ Methods</h4>
21022095

21032096
2. Set the {{[[rendering thread state]]}} on the {{AudioContext}} to <code>suspended</code>.
21042097

2105-
3. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2106-
queue a media element task</a> to execute the following steps:
2098+
3. [=Queue a media element task=] to execute the following steps:
21072099

21082100
1. Resolve <var>promise</var>.
21092101

@@ -2175,15 +2167,13 @@ Methods</h4>
21752167

21762168
1. If both |sinkId| and {{AudioContext/[[sink ID]]}} are a type of
21772169
{{DOMString}}, and they are equal to each other,
2178-
<a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2179-
queue a media element task</a> to resolve |p| and abort these steps.
2170+
[=Queue a media element task=] to resolve |p| and abort these steps.
21802171

21812172
1. If |sinkId| is a type of {{AudioSinkOptions}} and
21822173
{{AudioContext/[[sink ID]]}} is a type of {{AudioSinkInfo}}, and
21832174
{{AudioSinkOptions/type}} in |sinkId| and {{AudioSinkInfo/type}} in
21842175
{{AudioContext/[[sink ID]]}} are equal,
2185-
<a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2186-
queue a media element task</a> to resolve |p| and abort these steps.
2176+
[=Queue a media element task=] to resolve |p| and abort these steps.
21872177

21882178
1. Let |wasRunning| be true.
21892179

@@ -2199,8 +2189,7 @@ Methods</h4>
21992189
1. Set the {{[[rendering thread state]]}} on the {{AudioContext}} to
22002190
<code>"suspended"</code>.
22012191

2202-
1. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2203-
Queue a media element task</a> to execute the following steps:
2192+
1. [=Queue a media element task=] to execute the following steps:
22042193

22052194
1. If the {{BaseAudioContext/state}} attribute of the
22062195
{{AudioContext}} is not already "{{AudioContextState/suspended}}":
@@ -2221,8 +2210,7 @@ Methods</h4>
22212210
In case of failure, reject |p| with "{{InvalidAccessError}}" abort
22222211
the following steps.
22232212

2224-
1. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2225-
Queue a media element task</a> to execute the following steps:
2213+
1. [=Queue a media element task=] to execute the following steps:
22262214

22272215
1. If |sinkId| is a type of {{DOMString}}, set
22282216
{{AudioContext/[[sink ID]]}} to |sinkId|. Abort these steps.
@@ -2248,8 +2236,7 @@ Methods</h4>
22482236
1. Set the {{[[rendering thread state]]}} on the {{AudioContext}} to
22492237
<code>"running"</code>.
22502238

2251-
1. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2252-
Queue a media element task</a> to execute the following steps:
2239+
1. [=Queue a media element task=] to execute the following steps:
22532240

22542241
1. If the {{BaseAudioContext/state}} attribute of the
22552242
{{AudioContext}} is not already "{{AudioContextState/running}}":
@@ -2624,8 +2611,7 @@ Methods</h4>
26242611
buffer.
26252612

26262613
<li>Once the rendering is complete,
2627-
<a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2628-
queue a media element task</a> to execute the following steps:
2614+
[=Queue a media element task=] to execute the following steps:
26292615

26302616
<ol>
26312617
<li>Resolve the <var ignore>promise</var> created by {{startRendering()}}
@@ -2689,11 +2675,9 @@ Methods</h4>
26892675
2. Start <a href="#rendering-loop">rendering the audio graph</a>.
26902676

26912677
3. In case of failure,
2692-
<a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2693-
queue a media element task</a> to reject |promise| and abort the remaining steps.
2678+
[=Queue a media element task=] to reject |promise| and abort the remaining steps.
26942679

2695-
4. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
2696-
queue a media element task</a> to execute the following steps:
2680+
4. [=Queue a media element task=] to execute the following steps:
26972681

26982682
1. Resolve <var>promise</var>.
26992683

@@ -10548,8 +10532,7 @@ Methods</h5>
1054810532
<a>node name to processor constructor map</a>
1054910533
of the associated {{AudioWorkletGlobalScope}}.
1055010534

10551-
1. <a href="https://html.spec.whatwg.org/multipage/media.html#queue-a-media-element-task">
10552-
queue a media element task</a> to append the key-value pair |name| →
10535+
1. [=Queue a media element task=] to append the key-value pair |name| →
1055310536
|parameterDescriptorSequence| to the <a>node name to parameter descriptor map</a> of the
1055410537
associated {{BaseAudioContext}}.
1055510538
</div>
@@ -12024,11 +12007,11 @@ The {{AudioContext}} |audioContext| performs the following steps on the <a>rende
1202412007

1202512008
1. Attempt to <a href="#acquiring">acquire system resources</a>.
1202612009

12027-
2. Set the {{[[rendering thread state]]}} on the {{AudioContext}} to <code>running</code>.
12010+
1. Set the {{[[rendering thread state]]}} on the {{AudioContext}} to <code>running</code>.
1202812011

12029-
3. Start <a href="#rendering-loop">rendering the audio graph</a>.
12012+
1. Start <a href="#rendering-loop">rendering the audio graph</a>.
1203012013

12031-
4. [=Queue a media element task=] to execute the following steps:
12014+
1. [=Queue a media element task=] to execute the following steps:
1203212015

1203312016
1. If the {{BaseAudioContext/state}} attribute of the {{AudioContext}} is not already "{{AudioContextState/running}}":
1203412017

@@ -12040,7 +12023,7 @@ The {{AudioContext}} |audioContext| performs the following steps on the <a>rende
1204012023

1204112024
1. Set the {{[[rendering thread state]]}} on the {{AudioContext}} to <code>suspended</code>.
1204212025

12043-
2. [=Queue a media element task=] to execute the following steps:
12026+
1. [=Queue a media element task=] to execute the following steps:
1204412027

1204512028
1. Set the |audioContext|'s {{[[control thread state]]}} to <code>suspended</code>.
1204612029

0 commit comments

Comments
 (0)