Skip to content

Commit bb5d55a

Browse files
committed
initial commit
1 parent 6e9fda1 commit bb5d55a

File tree

1 file changed

+0
-132
lines changed

1 file changed

+0
-132
lines changed

index.bs

Lines changed: 0 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,6 @@ interface AudioContext : BaseAudioContext {
14771477
readonly attribute double baseLatency;
14781478
readonly attribute double outputLatency;
14791479
[SecureContext] readonly attribute (DOMString or AudioSinkInfo) sinkId;
1480-
[SecureContext] readonly attribute AudioRenderCapacity renderCapacity;
14811480
attribute EventHandler onsinkchange;
14821481
attribute EventHandler onerror;
14831482
AudioTimestamp getOutputTimestamp ();
@@ -1725,11 +1724,6 @@ Attributes</h4>
17251724
useful to query this value frequently when accurate
17261725
synchronization is required.
17271726

1728-
: <dfn>renderCapacity</dfn>
1729-
::
1730-
Returns an {{AudioRenderCapacity}} instance associated with
1731-
an {{AudioContext}}.
1732-
17331727
: <dfn>sinkId</dfn>
17341728
::
17351729
Returns the value of {{AudioContext/[[sink ID]]}} internal slot. This
@@ -2396,132 +2390,6 @@ Dictionary {{AudioTimestamp}} Members</h5>
23962390
[[!hr-time-3]]).
23972391
</dl>
23982392

2399-
<h4 interface lt="audiorenderCapacity" id="AudioRenderCapacity">
2400-
{{AudioRenderCapacity}}</h4>
2401-
2402-
<pre class="idl">
2403-
[Exposed=Window]
2404-
interface AudioRenderCapacity : EventTarget {
2405-
undefined start(optional AudioRenderCapacityOptions options = {});
2406-
undefined stop();
2407-
attribute EventHandler onupdate;
2408-
};
2409-
</pre>
2410-
2411-
This interface provides rendering performance metrics of an
2412-
{{AudioContext}}. In order to calculate them, the renderer collects a
2413-
<a>load value</a> per <a>system-level audio callback</a>.
2414-
2415-
<h5 id="AudioRenderCapacity-attributes">
2416-
Attributes</h5>
2417-
2418-
<dl dfn-type=attribute dfn-for="AudioRenderCapacity">
2419-
: <dfn>onupdate</dfn>
2420-
::
2421-
The event type of this event handler is <dfn event>update</dfn>. Events
2422-
dispatched to the event handler will use the
2423-
{{AudioRenderCapacityEvent}} interface.
2424-
</dl>
2425-
2426-
<h5 id="AudioRenderCapacity-methods">
2427-
Methods</h5>
2428-
2429-
<dl dfn-type=method dfn-for="AudioRenderCapacity">
2430-
: <dfn>start(options)</dfn>
2431-
::
2432-
Starts metric collection and analysis. This will repeatedly [=fire an event=] named
2433-
{{AudioRenderCapacity/update}} at the {{AudioRenderCapacity}}, using
2434-
{{AudioRenderCapacityEvent}}, with the given update interval in
2435-
{{AudioRenderCapacityOptions}}.
2436-
2437-
: <dfn>stop()</dfn>
2438-
::
2439-
Stops metric collection and analysis. It also stops dispatching
2440-
{{AudioRenderCapacity/update}} events.
2441-
</dl>
2442-
2443-
<h4 dictionary lt="audiorenderCapacityoptions" id="AudioRenderCapacityOptions">
2444-
{{AudioRenderCapacityOptions}}</h4>
2445-
2446-
The {{AudioRenderCapacityOptions}} dictionary can be used to provide user
2447-
options for an {{AudioRenderCapacity}}.
2448-
2449-
<pre class="idl">
2450-
dictionary AudioRenderCapacityOptions {
2451-
double updateInterval = 1;
2452-
};
2453-
</pre>
2454-
2455-
<h5 id="dictionary-AudioRenderCapacityOptions-members">
2456-
Dictionary {{AudioRenderCapacityOptions}} Members</h5>
2457-
2458-
<dl dfn-type=dict-member dfn-for="AudioRenderCapacityOptions">
2459-
: <dfn>updateInterval</dfn>
2460-
::
2461-
An update interval (in second) for dispaching
2462-
{{AudioRenderCapacityEvent}}s. A <a>load value</a> is calculated
2463-
per <a>system-level audio callback</a>, and multiple load values will
2464-
be collected over the specified interval period. For example, if
2465-
the renderer runs at a 48Khz sample rate and the <a>system-level
2466-
audio callback</a>'s buffer size is 192 frames, 250 load values
2467-
will be collected over 1 second interval.
2468-
2469-
If the given value is smaller than the duration of
2470-
the <a>system-level audio callback</a>, {{NotSupportedError}} is
2471-
thrown.
2472-
</dl>
2473-
2474-
<h4 interface lt="audiorenderCapacityevent" id="AudioRenderCapacityEvent">
2475-
{{AudioRenderCapacityEvent}}</h4>
2476-
2477-
<pre class="idl">
2478-
[Exposed=Window]
2479-
interface AudioRenderCapacityEvent : Event {
2480-
constructor (DOMString type, optional AudioRenderCapacityEventInit eventInitDict = {});
2481-
readonly attribute double timestamp;
2482-
readonly attribute double averageLoad;
2483-
readonly attribute double peakLoad;
2484-
readonly attribute double underrunRatio;
2485-
};
2486-
2487-
dictionary AudioRenderCapacityEventInit : EventInit {
2488-
double timestamp = 0;
2489-
double averageLoad = 0;
2490-
double peakLoad = 0;
2491-
double underrunRatio = 0;
2492-
};
2493-
</pre>
2494-
2495-
<h5 id="AudioRenderCapacityEvent-attributes">
2496-
Attributes</h5>
2497-
2498-
<dl dfn-type=attribute dfn-for="AudioRenderCapacityEvent">
2499-
: <dfn>timestamp</dfn>
2500-
::
2501-
The start time of the data collection period in terms of the
2502-
associated {{AudioContext}}'s {{BaseAudioContext/currentTime}}.
2503-
: <dfn>averageLoad</dfn>
2504-
::
2505-
An average of collected load values over the given update
2506-
interval. The precision is limited to 1/100th.
2507-
: <dfn>peakLoad</dfn>
2508-
::
2509-
A maximum value from collected load values over the given update
2510-
interval. The precision is also limited to 1/100th.
2511-
: <dfn>underrunRatio</dfn>
2512-
::
2513-
A ratio between the number of buffer underruns (when a
2514-
<a>load value</a> is greater than 1.0) and the total number of
2515-
<a>system-level audio callback</a>s over the given update interval.
2516-
2517-
Where \(u\) is the number of buffer underruns and \(N\) is the
2518-
number of <a>system-level audio callback</a>s over the given update
2519-
interval, the buffer underrun ratio is:
2520-
- 0.0 if \(u\) = 0.
2521-
- Otherwise, compute \(u/N\) and take a ceiling value of the
2522-
nearest 100th.
2523-
</dl>
2524-
25252393
<!--
25262394
███████ ████████ ████████ ██ ████ ██ ██ ████████ ███ ██████
25272395
██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██

0 commit comments

Comments
 (0)