Skip to content

Commit 9c56010

Browse files
gabrielsanbritohoch
authored andcommitted
Wrapping lines to be 80 char length
1 parent f905cf3 commit 9c56010

1 file changed

Lines changed: 64 additions & 35 deletions

File tree

index.bs

Lines changed: 64 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,7 +1962,10 @@ Methods</h4>
19621962
<span class="synchronous">When resume is called,
19631963
execute these steps:</span>
19641964

1965-
1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=fully active=] then return [=a promise rejected with=] "{{InvalidStateError}}" {{DOMException}}.
1965+
1. If [=this=]'s [=relevant global object=]'s
1966+
[=associated Document=] is not [=fully active=] then return
1967+
[=a promise rejected with=] "{{InvalidStateError}}"
1968+
{{DOMException}}.
19661969

19671970
1. Let <var>promise</var> be a new Promise.
19681971

@@ -1973,26 +1976,28 @@ Methods</h4>
19731976

19741977
1. Set {{[[suspended by user]]}} to <code>false</code>.
19751978

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

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

1981-
1. Set the {{BaseAudioContext/state}} attribute of the {{AudioContext}} to "{{AudioContextState/interrupted}}".
1985+
1. Set the {{BaseAudioContext/state}} attribute of the
1986+
{{AudioContext}} to "{{AudioContextState/interrupted}}".
19821987

19831988
1. [=Queue a media element task=] to [=fire an event=] named
1984-
{{BaseAudioContext/statechange}} at the {{AudioContext}}.
1989+
{{BaseAudioContext/statechange}} at the {{AudioContext}}.
19851990

1986-
1. Reject the promise with {{InvalidStateError}}, abort these steps,
1987-
returning <var>promise</var>.
1991+
1. Reject the promise with {{InvalidStateError}}, abort these
1992+
steps, returning <var>promise</var>.
19881993

19891994
1. If the context is not <a>allowed to start</a>, append
1990-
<var>promise</var> to {{BaseAudioContext/[[pending promises]]}} and
1991-
{{AudioContext/[[pending resume promises]]}} and abort these steps, returning
1992-
<var>promise</var>.
1995+
<var>promise</var> to {{BaseAudioContext/[[pending promises]]}}
1996+
and {{AudioContext/[[pending resume promises]]}} and abort
1997+
these steps, returning <var>promise</var>.
19931998

1994-
1. Set the {{[[control thread state]]}} on the
1995-
{{AudioContext}} to <code>running</code>.
1999+
1. Set the {{[[control thread state]]}} on the {{AudioContext}} to
2000+
<code>running</code>.
19962001

19972002
1. <a>Queue a control message</a> to resume the {{AudioContext}} with <var>promise</var>.
19982003

@@ -11966,66 +11971,90 @@ buffer</a> and the value(s) of the {{AudioParam}}(s) of this
1196611971

1196711972
<h3 id="interruption-handling">Handling an interruption on the {{AudioContext}}</h3>
1196811973

11969-
An <dfn>interruption</dfn> is an event generated by the user agent when it needs to halt audio playback for
11970-
an {{AudioContext}}. For example, The user agent may create an interruption when another application
11971-
requests exclusive access to the audio output hardware. This could happen when there is an incoming
11972-
call from a VoIP application.
11974+
An <dfn>interruption</dfn> is an event generated by the user agent when it needs
11975+
to halt audio playback for an {{AudioContext}}. For example, The user agent may
11976+
create an interruption when another application requests exclusive access to the
11977+
audio output hardware. This could happen when there is an incoming call from a
11978+
VoIP application.
1197311979

11974-
The {{AudioContext}} |audioContext| performs the following steps on the <a>rendering thread</a> when an interruption happens.
11980+
The {{AudioContext}} |audioContext| performs the following steps on the
11981+
<a>rendering thread</a> when an interruption happens.
1197511982

11976-
1. If the |audioContext|'s {{[[rendering thread state]]}} is <code>closed</code> or <code>interrupted</code>:
11983+
1. If the |audioContext|'s {{[[rendering thread state]]}} is <code>closed</code>
11984+
or <code>interrupted</code>:
1197711985

1197811986
1. Abort these steps.
1197911987

11980-
1. If the |audioContext|'s {{[[rendering thread state]]}} is <code>running</code>:
11988+
1. If the |audioContext|'s {{[[rendering thread state]]}} is
11989+
<code>running</code>:
1198111990

1198211991
1. Attempt to <a>release system resources</a>.
1198311992

1198411993
1. [=Queue a media element task=] to execute the following steps:
1198511994

11986-
1. Set the |audioContext|'s {{[[control thread state]]}} to <code>interrupted</code>.
11995+
1. Set the |audioContext|'s {{[[control thread state]]}} to
11996+
<code>interrupted</code>.
1198711997

11988-
1. [=Fire an event=] named {{BaseAudioContext/statechange}} at the |audioContext|.
11998+
1. [=Fire an event=] named {{BaseAudioContext/statechange}} at the
11999+
|audioContext|.
1198912000

11990-
1. If the |audioContext|'s {{[[rendering thread state]]}} is <code>suspended</code>:
12001+
1. If the |audioContext|'s {{[[rendering thread state]]}} is
12002+
<code>suspended</code>:
1199112003

1199212004
1. [=Queue a media element task=] to execute the following steps:
1199312005

11994-
1. Set the |audioContext|'s {{[[control thread state]]}} to <code>interrupted</code>.
12006+
1. Set the |audioContext|'s {{[[control thread state]]}} to
12007+
<code>interrupted</code>.
1199512008

11996-
1. Set the |audioContext|'s {{[[rendering thread state]]}} to <code>interrupted</code>.
12009+
1. Set the |audioContext|'s {{[[rendering thread state]]}} to
12010+
<code>interrupted</code>.
1199712011

11998-
Note: If the {{AudioContext}} is <code>suspended</code> a {{BaseAudioContext/statechange}} event is not fired for privacy reasons to avoid over-sharing user activity - e.g. when a phone call comes in or when the screen gets locked.
12012+
Note: If the {{AudioContext}} is <code>suspended</code> a
12013+
{{BaseAudioContext/statechange}} event is not fired for privacy reasons to avoid
12014+
over-sharing user activity - e.g. when a phone call comes in or when the screen
12015+
gets locked.
1199912016

12000-
The {{AudioContext}} |audioContext| performs the following steps on the <a>rendering thread</a> when the [=interruption=] ends.
12017+
The {{AudioContext}} |audioContext| performs the following steps on the
12018+
<a>rendering thread</a> when the [=interruption=] ends.
1200112019

12002-
1. If the |audioContext|'s {{[[rendering thread state]]}} is not <code>interrupted</code>:
12020+
1. If the |audioContext|'s {{[[rendering thread state]]}} is not
12021+
<code>interrupted</code>:
1200312022

1200412023
1. Abort these steps.
1200512024

12006-
1. If the |audioContext|'s {{[[rendering thread state]]}} was <code>running</code> before the [=interruption=] or if the the |audioContext|'s {{[[rendering thread state]]}} was <code>suspended</code> and {{AudioContext/resume}} was called during the [=interruption=]:
12025+
1. If the |audioContext|'s {{[[rendering thread state]]}} was
12026+
<code>running</code> before the [=interruption=] or if the the
12027+
|audioContext|'s {{[[rendering thread state]]}} was <code>suspended</code>
12028+
and {{AudioContext/resume}} was called during the [=interruption=]:
1200712029

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

12010-
1. Set the {{[[rendering thread state]]}} on the {{AudioContext}} to <code>running</code>.
12032+
1. Set the {{[[rendering thread state]]}} on the {{AudioContext}} to
12033+
<code>running</code>.
1201112034

1201212035
1. Start <a href="#rendering-loop">rendering the audio graph</a>.
1201312036

1201412037
1. [=Queue a media element task=] to execute the following steps:
1201512038

12016-
1. If the {{BaseAudioContext/state}} attribute of the {{AudioContext}} is not already "{{AudioContextState/running}}":
12039+
1. If the {{BaseAudioContext/state}} attribute of the {{AudioContext}}
12040+
is not already "{{AudioContextState/running}}":
1201712041

12018-
1. Set the |audioContext|'s {{[[control thread state]]}} to <code>running</code>.
12042+
1. Set the |audioContext|'s {{[[control thread state]]}} to
12043+
<code>running</code>.
1201912044

12020-
1. [=Fire an event=] named {{BaseAudioContext/statechange}} at the |audioContext|.
12045+
1. [=Fire an event=] named {{BaseAudioContext/statechange}} at the
12046+
|audioContext|.
1202112047

12022-
1. If the |audioContext|'s {{[[rendering thread state]]}} was <code>suspended</code> before the [=interruption=]:
12048+
1. If the |audioContext|'s {{[[rendering thread state]]}} was
12049+
<code>suspended</code> before the [=interruption=]:
1202312050

12024-
1. Set the {{[[rendering thread state]]}} on the {{AudioContext}} to <code>suspended</code>.
12051+
1. Set the {{[[rendering thread state]]}} on the {{AudioContext}} to
12052+
<code>suspended</code>.
1202512053

1202612054
1. [=Queue a media element task=] to execute the following steps:
1202712055

12028-
1. Set the |audioContext|'s {{[[control thread state]]}} to <code>suspended</code>.
12056+
1. Set the |audioContext|'s {{[[control thread state]]}} to
12057+
<code>suspended</code>.
1202912058

1203012059
<h3 id="error-handling-on-a-running-audio-context">
1203112060
Handling an error from System Audio Resources on the {{AudioContext}}</h3>

0 commit comments

Comments
 (0)