From ddfc2fdb6c04ef7c28ef8ab9cf253c206704c32f Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Thu, 26 Sep 2024 14:43:20 -0700 Subject: [PATCH 01/10] initial commit --- index.bs | 274 +------------------------------------------------------ 1 file changed, 3 insertions(+), 271 deletions(-) diff --git a/index.bs b/index.bs index 1e38c5726..c849daa32 100644 --- a/index.bs +++ b/index.bs @@ -1,11 +1,11 @@
 Title: Web Audio API
 Shortname: webaudio
-Level: 1
+Level: 1.1
 Group: audiowg
-Status: ED
+Status: FPWD
 ED: https://webaudio.github.io/web-audio-api/
-TR: https://www.w3.org/TR/webaudio/
+TR: https://www.w3.org/TR/webaudio-11/
 Favicon: favicon.png
 Previous Version: https://www.w3.org/TR/2021/CR-webaudio-20210114/
 Previous Version: https://www.w3.org/TR/2020/CR-webaudio-20200611/
@@ -14175,274 +14175,6 @@ class Vec3 {
 
 

Change Log

-

- Changes since Recommendation of 17 Jun 2021 -

- * Issue 2450: Allow specifying a different render-quantum-size for an AudioContext or OfflineAudioContext -
-
- * Issue 2512: Specify AnalyserNode treatment of non-fininte values. -
-
- * Issue 2456: Add a MessagePort to the AudioWorkletGlobalScope -
-
- * Issue 2444: Add AudioRenderCapacity interface and related classes -
-
- * Issue 2361: Use new Web IDL buffer primitives -
-
- * Issue 127: RangeError is thrown only for negative cancelTime -
-
- * Issue 2359: Fix a typo in the VUMeterNode example -
-
- * Issue 2373: Fix a typo: initially instead of initialy -
-
- * Issue 2321: Warn about corrupted fils in decodeAudioData. -
-
- * Issue 2375: decodeAudioData only decodes the first track of a multi-track audio file. -
-
- * Issue - 2475: Add definition for various concepts related to system-level audio callbacks -
-
- * Issue 2400 - : Access to a different output device: AudioContext.setSinkId() -
- -

- Since Proposed Recommendation of 6 May 2021 -

- * Styling, status and boilerplate updates for Recommendation - * Updated links to RFC2119, High-Resolution Time, and Audio EQ Cookbook - * A spelling error was corrected - -

- Since Candidate Recommendation of 14 January 2021 -

- - * PR 2333: Update links to point to W3C versions - * PR 2334: Use bikeshed to link to ErrorEvent - * PR 2331: Add MIMESniff to normative references - * PR 2328: MediaStream must be resampled to match the context sample rate - * PR 2318: Restore empty of pending processor construction data after successful initialization of AudioWorkProcessor#port. - * PR 2317: Standardize h3/h4 interface and dictionary markup - * PR 2312: Rework description of control thread state and rendering thread state - * PR 2311: Adjust the steps to process a context's regular task queue - * PR 2310: OscillatorNode output is mono - * PR 2308: Refine phrasing for "allowed to start" - * PR 2307: Replace "queue a task" with "queue a media element task" - * PR 2306: Move some steps from AudioWorkletProcessor constructor to the instantiation algorithm - * PR 2304: Add required components for ES operations in the rendering loop - * PR 2301: Define when and how regular tasks are processed wrt the processing model - * PR 2286: Clean up ABSN start algorithm - * PR 2277: Fix compression curve diagram - * PR 2273: Clarify units used in threshold & knee value calculations - * PR 2256: ABSN extrapolates the last output - * PR 2250: Use FrozenArray for AudioWorkletProcessor process() - * PR 2298: Bikeshed HTML validation issues - -

- Since Candidate Recommendation of 11 June 2020 -

- - * PR 2202: Fixed wrong optionality of IIRFilterNode options - * Issue 2191: Restrict sounds beyond normal hearing - * PR 2210: Return rejected promise when the document is not fully active, for operations returning promises - * Issue 2191: Destination of request created by `addModule` - * Issue 2213: The message queue is for message running on the rendering thread. - * Issue 2216: Use inclusive language in the spec - * PR 2219: Update more terminology in images and markdown documents - * Issue 2206: PannerNode.rollOffFactor with "linear" distance model is not clamped to [0, 1] in main browser engines - * Issue 2169: AudioParamDescriptor has member constraints that are redundant - * Issue 1457: [privacy] Exposing data to an origin: fingerprinting - * Issue 2061: Privacy re-review of latest changes - * Issue 2225: Describe "Planar versus interleaved buffers" - * Issue 2231: WaveShaper [[curve set]] not defined - * Issue 2240: Align with Web IDL specification - * Issue 2242: LInk to undefined instead of using `` - * Issue 2227: Clarify buffer.copyToChannel() must be called before source.buffer = buffer else nothing is played - * PR 2253: Fix duplicated IDs for decode callbacks - * Issue 2252: When are promises in "[[pending resume promises]]" resolved? - * PR 2266: Prohibit arbitrary termination of AudioWorkletGlobalScopes - -

- Since Candidate Recommendation of 18 September 2018 -

- -* Issue 2193: Incorrect azimuth comparison in spatialization algorithm -* Issue 2192: Waveshaper curve interpolation algorithm incorrect -* Issue 2171: Allow not having get parameterDescriptors in an AudioWorkletProcessor -* Issue 2184: PannerNode refDistance description unclear -* Issue 2165: AudioScheduledSourceNode start algorithm incomplete -* Issue 2155: Restore changes accidentally reverted in bikeshed conversion -* Issue 2154: Exception for changing channelCountMode on ScriptProcessorNode does not match browsers -* Issue 2153: Exception for changing channelCount on ScriptProcessorNode does not match browsers -* Issue 2152: close() steps don't make sense -* Issue 2150: AudioBufferOptions requires throwing NotFoundError in cases that can't happen -* Issue 2149: MediaStreamAudioSourceNode constructor has weird check for AudioContext -* Issue 2148: IIRFilterOptions description makes impossible demands -* Issue 2147: PeriodicWave constructor examines lengths of things that might not be there -* Issue 2113: BiquadFilter gain lower bound can be lower. -* Issue 2096: Lifetime of pending processor construction data and exceptions in instantiation of AudioWorkletProcessor -* Issue 2087: Minor issues with BiquadFilter AudioParams -* Issue 2083: Missing text in WaveShaperNode? -* Issue 2082: WaveShaperNode curve interpolation incomplete -* Issue 2074: Should the AudioWorkletNode constructor invoke the algorithm for initializing an object that inherits from AudioNode? -* Issue 2073: Inconsistencies in constructor descriptions and factory method initialization -* Issue 2072: Clarification on `AudioBufferSourceNode` looping, and loop points -* Issue 2071: cancelScheduledValues with setValueCurveAtTime -* Issue 2060: Would it be helpful to restrict use of `AudioWorkletProcessor.port().postMessage()` in order to facilitate garbage collection? -* Issue 2051: Update to constructor operations -* Issue 2050: Restore ConvolverNode channel mixing configurability (up to 2 channels) -* Issue 2045: Should the check on `process()` be removed from `AudioWorkletGlobalScope.registerProcessor()`? -* Issue 2044: Remove `options` parameter from `AudioWorkletProcessor` constructor WebIDL -* Issue 2036: Remove `options` parameter of `AudioWorkletProcessor` constructor -* Issue 2035: De-duplicate initial value setting on AudioWorkletNode AudioParams -* Issue 2027: Revise "processor construction data" algorithm -* Issue 2021: AudioWorkletProcessor constructor leads to infinite recursion -* Issue 2018: There are still issues with the setup of an AudioWorkletNode's parameters -* Issue 2016: Clarify `parameters` in AudioWorkletProcessor.process() -* Issue 2011: AudioWorkletNodeOptions.processorOptions should not default to null. -* Issue 1989: Please update to Web IDL changes to optional dictionary defaulting -* Issue 1984: Handling of exceptions in audio worklet is not very clear -* Issue 1976: AudioWorkletProcessor's [[node reference]] seems to be write-only -* Issue 1972: parameterDescriptors handling during AudioWorkletNode initialization is probably wrong -* Issue 1971: AudioWorkletNode options serialization is underdefined -* Issue 1970: "active source" flag handling is a weird monkeypatch -* Issue 1969: It would be clearer if the various validation of AudioWorkletNodeOptions were an explicit step or set of steps -* Issue 1966: parameterDescriptors is not looked up by the AudioWorkletProcessor constructor -* Issue 1963: NewTarget check for AudioWorkletProcessor isn't actually possible with a Web IDL constructor -* Issue 1947: Spec is inconsistent about whether parameterDescriptors is an array or an iterable -* Issue 1946: Population of "node name to parameter descriptor map" needs to be defined -* Issue 1945: registerProcessor is doing odd things with threads and JS values -* Issue 1943: Describe how WaveShaperNode shapes the input with the curve -* Issue 1935: length of AudioWorkletProcessor.process() parameter sequences with inactive inputs -* Issue 1932: Make AudioWorkletNode output buffer available for reading -* Issue 1925: front vs forward -* Issue 1902: Mixer Gain Structure section not needed -* Issue 1906: Steps in rendering algorithm -* Issue 1905: Rendering callbacks are observable -* Issue 1904: Strange Note in algorithm for swapping a control message queue -* Issue 1903: Funny sentence about priority and latency -* Issue 1901: AudioWorkletNode state property? -* Issue 1900: AudioWorkletProcessor NewTarget undefined -* Issue 1899: Missing synchronous markers -* Issue 1897: WaveShaper curve value setter allows multiple sets -* Issue 1896: WaveShaperNode constructor says curve set is initialized to false -* Issue #1471: AudioNode Lifetime section seems to attempt to make garbage collection observable -* Issue #1893: Active processing for Panner/Convolver/ChannelMerger -* Issue #1894: Funny text in PannerNode.orientationX -* Issue #1866: References to garbage collection -* Issue #1851: Parameter values used for BiquadFilterNode::getFrequencyResponse -* Issue #1905: Rendering callbacks are observable -* Issue #1879: ABSN playback algorithm offset -* Issue #1882: Biquad lowpass/highpass Q -* Issue #1303: MediaElementAudioSourceNode information in a funny place -* Issue #1896: WaveShaperNode constructor says curve set is initialized to false -* Issue #1897: WaveShaper curve value setter allows multiple sets. -* Issue #1880: setOrientation description has confusing paragraph -* Issue #1855: createScriptProcessor parameter requirements -* Issue #1857: Fix typos and bad phrasing -* Issue #1788: Unclear what value is returned by AudioParam.value -* Issue #1852: Fix error condition of AudioNode.disconnect(destinationNode, output, input) -* Issue #1841: Recovering from unstable biquad filters? -* Issue #1777: Picture of the coordinate system for panner node -* Issue #1802: Clarify interaction between user-invoked suspend and autoplay policy -* Issue #1822: OfflineAudioContext.suspend can suspend before the given time -* Issue #1772: Sorting tracks alphabetically is underspecified -* Issue #1797: Specification is incomplete for AudioNode.connect() -* Issue #1805: Exception ordering on error -* Issue #1790: Automation example chart has an error (reversed function arguments -* Fix rendering algorithm iteration and cycle breaking -* Issue #1719: channel count changes in filter nodes with tail time -* Issue #1563: Make decodeAudioData more precise -* Issue #1481: Tighten spec on ABSN output channels? -* Issue #1762: Setting convolver buffer more than once? -* Issue #1758: Explicitly include time-domain processing code for BiquadFilterNode -* Issue #1770: Link to correct algorithm for StereoPannerNode, mention algorithm is equal-power -* Issue #1753: Have a single `AudioWorkletGlobalScope` per `BaseAudioContext` -* Issue #1746: AnalyserNode: Clarify how much time domain data we're supposed to keep around -* Issue #1741: Sample rate of AudioBuffer -* Issue #1745: Clarify unit of fftSize -* Issue #1743: Missing normative reference to Fetch -* Use "get a reference to the bytes" algorithm as needed. -* Specify rules for determining output chanel count. -* Clarified rendering algorithm for AudioListener. -

- Since Working Draft of 19 June 2018 -

-* Minor editorial clarifications. -* Update implementation-report.html. -* Widen the valid range of detune values so that any value that doesn't cause 2^(d/1200) to overflow is valid. -* PannerNode constructor throws errors. -* Rephrase algorithm for setting buffer and curve. -* Refine startRendering algorithm. -* Make "queue a task" link to the HTML spec. -* Specify more precisely, events overlapping with SetValueCurveAtTime. -* Add implementation report to gh-pages. -* Honor the given value in `outputChannelCount`. -* Initialize bufferDuration outside of process() in ABSN algorithm. -* Rework definition of ABSN output behavior to account for playbackRate’s interaction with the start(…duration) argument. -* Add mention of video element in ultrasonic attack surface. - -

-Since Working Draft of 08 December 2015

-* Add AudioWorklet and related interfaces to support custom nodes. This replaces ScriptProcessorNode, which is now deprecated. -* Explicitly say what the channel count, mode, and interpretation values are for all source nodes. -* Specify the behavior of Web Audio when a document is unloaded. -* Merge the proposed SpatialListener interface into AudioListener. -* Rework and clean up algorithms for panning and spatialization and define "magic functions". -* Clarify that AudioBufferSourceNode looping is limited by duration argument to start(). -* Add constructors with options dictionaries for all node types. -* Clarify parameter automation method behavior and equations. Handle cases where automation methods may interact with each other. -* Support latency hints and arbitrary sample rates in AudioContext constructor. -* Clear up ambiguities in definitions of start() and stop() for scheduled sources. -* Remove automatic dezippering from AudioParam value setters which now equate to setValueAtTime(). -* Specify normative behavior of DynamicsCompressorNode. -* Specify that AudioParam.value returns the most recent computed value. -* Permit AudioBufferSourceNode to specify sub-sample start, duration, loopStart and loopEnd. Respecify algorithms to say exactly how looping works in all scenarios, including dynamic and negative playback rates. -* Harmonized behavior of IIRFilterNode with BiquadFilterNode. -* Add diagram describing mono-input-to-matrixed-stereo case. -* Prevent connecting an AudioNode to an AudioParam of a different AudioContext. -* Added Audioparam cancelAndHoldAtTime -* Clarify behaviour of AudioParam.cancelScheduledValues(). -* Add playing reference to MediaElementAudioSourceNodes and MediaStreamAudioSourceNodes. -* Refactor BaseAudioContext interface out of AudioContext, OfflineAudioContext. -* OfflineAudioContext inherits from BaseAudioContext, not AudioContext. -* "StereoPanner" replaced with the correct "StereoPannerNode". -* Support chaining on AudioNode.connect() and AudioParam automation methods. -* Specify behavior of events following SetTarget events. -* Reinstate channelCount declaration for AnalyserNode. -* Specify exponential ramp behavior when previous value is 0. -* Specify behavior of setValueCurveAtTime parameters. -* Add spatialListener attribute to AudioContext. -* Remove section titled "Doppler Shift". -* Added a list of nodes and reason why they can add latency, in an informative section. -* Speced nominal ranges, nyquist, and behavior when outside the range. -* Spec the processing model for the Web Audio API. -* Merge the SpatialPannerNode into the PannerNode, undeprecating the PannerNode. -* Merge the SpatialListener into the AudioListener, undeprecating the AudioListener. -* Added latencyHint(s). -* Move the constructor from BaseAudioContext to AudioContext where it belongs; BaseAudioContext is not constructible. -* Specified the Behavior of automations and nominal ranges. -* The playbackRate is widened to +/- infinity. -* setValueCurveAtTime is modified so that an implicit call to setValueAtTime is made at the end of the curve duration. -* Make setting the `value` attribute of an `AudioParam` strictly equivalent of calling setValueAtTime with AudioContext.currentTime. -* Add new sections for AudioContextOptions and AudioTimestamp. -* Add constructor for all nodes. -* Define ConstantSourceNode. -* Make the WaveShaperNode have a tail time, depending on the oversampling level. -* Allow collecting MediaStreamAudioSourceNode or MediaElementAudioSourceNode when they won't play ever again. -* Add a concept of 'allowed to start' and use it when creating an AudioContext and resuming it from resume() (closes #836). -* Add AudioScheduledSourceNode base class for source nodes. -* Mark all AudioParams as being k-rate.

Acknowledgements

From bdddb8b5d209db12751ed53f729773a356a8f5b3 Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Thu, 26 Sep 2024 15:59:21 -0700 Subject: [PATCH 02/10] first pass --- index.bs | 1762 ++++++++++++++++-------------------------------------- 1 file changed, 511 insertions(+), 1251 deletions(-) diff --git a/index.bs b/index.bs index c849daa32..ed8479a2a 100644 --- a/index.bs +++ b/index.bs @@ -17,8 +17,8 @@ Previous Version: https://www.w3.org/TR/2012/WD-webaudio-20121213/ Previous Version: https://www.w3.org/TR/2012/WD-webaudio-20120802/ Previous Version: https://www.w3.org/TR/2012/WD-webaudio-20120315/ Previous Version: https://www.w3.org/TR/2011/WD-webaudio-20111215/ -Editor: Paul Adenot, Mozilla (https://www.mozilla.org/), padenot@mozilla.com, w3cid 62410 -Editor: Hongchan Choi, Google (https://www.google.com/), hongchan@google.com, w3cid 74103 +Editor: Paul Adenot, Mozilla, padenot@mozilla.com, w3cid 62410 +Editor: Hongchan Choi, Google, hongchan@google.com, w3cid 74103 Former Editor: Raymond Toy (until Oct 2018) Former Editor: Chris Wilson (Until Jan 2016) Former Editor: Chris Rogers (Until Aug 2013) @@ -98,76 +98,6 @@ window.addEventListener('DOMContentLoaded', () => { }); -