New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AudioWorklet section #869

Merged
merged 14 commits into from Aug 19, 2016

Conversation

Projects
None yet
8 participants
@hoch
Member

hoch commented Jun 29, 2016

PTAL.

Preview: http://hoch.github.io/web-audio-api/#AudioWorklet

I did not remove the AudioWorker section yet per @rtoy's suggestion. Once we settle on this change, I will submit another PR to remove the section.

Show outdated Hide outdated index.html
The <dfn>AudioWorklet</dfn> interface
</h2>
<p>
The AudioWorklet object allows importing user-supplied Javascript code

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

I think the style is to use either <code>AudioWorklet</code> or <a><code>AudioWorklet</code></a> if you want a link.

@rtoy

rtoy Jun 29, 2016

Contributor

I think the style is to use either <code>AudioWorklet</code> or <a><code>AudioWorklet</code></a> if you want a link.

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

This paragraph is about AudioWorklet. Does it still need to be linked to itself?

@hoch

hoch Jun 29, 2016

Member

This paragraph is about AudioWorklet. Does it still need to be linked to itself?

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

I'll fix the rest of <a> to <code>.

@hoch

hoch Jun 29, 2016

Member

I'll fix the rest of <a> to <code>.

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
that runs on the audio rendering thread. This processing mechanism
ensures the aligned execution of the script code with other built-in
<a>AudioNode</a>s in the audio graph. The AudioWorklet object imports
and stores the definition of custom audio processor and then an

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"processor" -> "processors"? If you want singular, then "of custom" -> "of a custom audio".

@rtoy

rtoy Jun 29, 2016

Contributor

"processor" -> "processors"? If you want singular, then "of custom" -> "of a custom audio".

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Rephrased.

@hoch

hoch Jun 29, 2016

Member

Rephrased.

Show outdated Hide outdated index.html
<a>AudioWorkletNode</a> object can be constructed based on the
processor definition. Note that the registered definition in an
AudioWorklet is valid for the entire global scope, therefore any
<a>AudioContext</a> in the same global scope can be used to create the

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Add <code> for AudioContext.

@rtoy

rtoy Jun 29, 2016

Contributor

Add <code> for AudioContext.

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
</p>
<p>
An AudioWorklet object provides the capability to import module
scripts into its associated <a>AudioWorkletGlobalScope</a>. The user

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Line 4995-4996 is a bit redundant since you already said that in lines 4986.

@rtoy

rtoy Jun 29, 2016

Contributor

Line 4995-4996 is a bit redundant since you already said that in lines 4986.

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Rephrased.

@hoch

hoch Jun 29, 2016

Member

Rephrased.

Show outdated Hide outdated index.html
An AudioWorklet object provides the capability to import module
scripts into its associated <a>AudioWorkletGlobalScope</a>. The user
agent can then create <a>AudioWorkletProcessor</a> classes registered
on the <a>AudioWorkletGlobalScopes</a> and construct their instances.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Move the "s" of AudioWorkletGlobalScope outside the tag. The link won't work as is.

@rtoy

rtoy Jun 29, 2016

Contributor

Move the "s" of AudioWorkletGlobalScope outside the tag. The link won't work as is.

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Rephrased - does not exist anymore.

@hoch

hoch Jun 29, 2016

Member

Rephrased - does not exist anymore.

Show outdated Hide outdated index.html
on the <a>AudioWorkletGlobalScopes</a> and construct their instances.
A processor object represents an audio processing module that runs on
the audio <a>rendering thread</a>. After the processor definition is
successfully stored, an instance of <a>AudioWorkletNode</a> can be

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"instance of AudioWorkletNode" -> "instance of an AudioWorkletNode"

@rtoy

rtoy Jun 29, 2016

Contributor

"instance of AudioWorkletNode" -> "instance of an AudioWorkletNode"

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
</dt>
<dd>
<p>
Imports a module script returns a promise once it is fully loaded.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"script returns" -> "script and returns"
"promise once it is fully loaded" should be rephrased. Maybe returns a promise that resolves when fully loaded?

@rtoy

rtoy Jun 29, 2016

Contributor

"script returns" -> "script and returns"
"promise once it is fully loaded" should be rephrased. Maybe returns a promise that resolves when fully loaded?

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
<p>
The construction procedure of <a>AudioWokletNode</a> and the
corresponding <a>AudioWorkletProcessor</a> object consists of several
coordinated interactions and the following algorithm specifies such

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"such" -> "the"

@rtoy

rtoy Jun 29, 2016

Contributor

"such" -> "the"

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
</p>
<ol>
<li>
<em>In the window scope</em>: Start AudioWorkletNode constructor.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

If each item is going to have <em> around the beginning phrase, then should this list be a dl list?

@rtoy

rtoy Jun 29, 2016

Contributor

If each item is going to have <em> around the beginning phrase, then should this list be a dl list?

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

I think this is a simple 'decorator', not the title of an item. Making it italic makes sense to me, but I am open to better alternatives.

@hoch

hoch Jun 29, 2016

Member

I think this is a simple 'decorator', not the title of an item. Making it italic makes sense to me, but I am open to better alternatives.

This comment has been minimized.

@rtoy

rtoy Jun 30, 2016

Contributor

After seeing the full text, I'm ok with leaving this as is.

@rtoy

rtoy Jun 30, 2016

Contributor

After seeing the full text, I'm ok with leaving this as is.

Show outdated Hide outdated index.html
</li>
<li>
<em>In the AudioWorkletGlobalScope</em>: Locate a registered
AudioWorkletProcessor subclass based on name argument. If none is

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"on name" -> "on the name"

@rtoy

rtoy Jun 29, 2016

Contributor

"on name" -> "on the name"

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

AudioWorkletProcessor -> <a><code>AudioWorkletProcessor</code></a>?

@rtoy

rtoy Jun 29, 2016

Contributor

AudioWorkletProcessor -> <a><code>AudioWorkletProcessor</code></a>?

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
an exception from the node constructor.
<ol>
<li>
Start registered constructor for custom processor subclass,

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

What do you mean by "start" here? How do you "start" a constructor? Is this supposed to be some kind of async operation?

@rtoy

rtoy Jun 29, 2016

Contributor

What do you mean by "start" here? How do you "start" a constructor? Is this supposed to be some kind of async operation?

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

By 'start' I meant beginning the constructor method. Is "invoke" or "initiate" better?

@hoch

hoch Jun 29, 2016

Member

By 'start' I meant beginning the constructor method. Is "invoke" or "initiate" better?

This comment has been minimized.

@rtoy

rtoy Jun 30, 2016

Contributor

If this start and the end (below) is meant to describe how to construct this, it might be clearer to do something like

  1. Construct Foo as follows:
    1. Do this
    2. Do that

Not sure if this is what you're trying to say.

@rtoy

rtoy Jun 30, 2016

Contributor

If this start and the end (below) is meant to describe how to construct this, it might be clearer to do something like

  1. Construct Foo as follows:
    1. Do this
    2. Do that

Not sure if this is what you're trying to say.

Show outdated Hide outdated index.html
<ol>
<li>
Start registered constructor for custom processor subclass,
passing structured clone of the options object that was provided

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"passing structure" -> "passing a structured"

@rtoy

rtoy Jun 29, 2016

Contributor

"passing structure" -> "passing a structured"

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
Initialize the processor’s states.
</li>
<li>
End the construction of an AudioWorkletProcessor and return to

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

How do you "end" the construction?

@rtoy

rtoy Jun 29, 2016

Contributor

How do you "end" the construction?

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Is "the construction method ends" better?

@hoch

hoch Jun 29, 2016

Member

Is "the construction method ends" better?

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
</ol>
</li>
<li>
<em>In the window scope</em>: Construct AudioParam objects in the node

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

AudioParam -> <a><code>AudioParam</code></a>

@rtoy

rtoy Jun 29, 2016

Contributor

AudioParam -> <a><code>AudioParam</code></a>

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
<li>
<em>In the window scope</em>: Construct AudioParam objects in the node
based on the information from the processor’s
parameterDescriptors getter and initialize parameter values from

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

parameterDescriptors -> <code>parameterDescriptors</code>. Maybe add a tag if there's a dfn for it.

@rtoy

rtoy Jun 29, 2016

Contributor

parameterDescriptors -> <code>parameterDescriptors</code>. Maybe add a tag if there's a dfn for it.

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
based on the information from the processor’s
parameterDescriptors getter and initialize parameter values from
options where the keys match names declared in
AudioParamDescriptors.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

AudioParamDescriptors -> <code>AudioParamDescriptor</code>s. Maybe add <a> tag to create a link.

@rtoy

rtoy Jun 29, 2016

Contributor

AudioParamDescriptors -> <code>AudioParamDescriptor</code>s. Maybe add <a> tag to create a link.

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

It is rephrased and does not exist anymore.

@hoch

hoch Jun 29, 2016

Member

It is rephrased and does not exist anymore.

Show outdated Hide outdated index.html
The <dfn>AudioWorkletNode</dfn> interface
</h2>
<p>
This interface represens an <a>AudioNode</a> which lives on the main

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Typo: "represens"

@rtoy

rtoy Jun 29, 2016

Contributor

Typo: "represens"

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
<p>
This interface represens an <a>AudioNode</a> which lives on the main
control thread. The user can create this node from an instance of
<a>AudioContext</a> and such node can be connected with other built-in

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Add <code> around AudioContext.

"such node" -> "such a node"

@rtoy

rtoy Jun 29, 2016

Contributor

Add <code> around AudioContext.

"such node" -> "such a node"

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
<a>AudioNode</a>s to form an audio graph.
</p>
<dl title=
"[Constructor(AudioContext context, DOMString name, optional AudioWorkletNodeOptions options)] interface AudioWorkletNode : AudioNode"

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Are we explicitly disallowing creating an audio worklet from an offline context?

@rtoy

rtoy Jun 29, 2016

Contributor

Are we explicitly disallowing creating an audio worklet from an offline context?

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

No. Then I should change it to 'BaseAudioContext context'.

@hoch

hoch Jun 29, 2016

Member

No. Then I should change it to 'BaseAudioContext context'.

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
</dt>
<dd>
<p>
The onmessage handler is called whenever the associated

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"onmessage" -> <code>onmessage</code>

@rtoy

rtoy Jun 29, 2016

Contributor

"onmessage" -> <code>onmessage</code>

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
</dt>
<dd>
<p>
postMessage May be called to send a message to the corresponding

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"postMessage" -> <code>postMessage</code>

Typo: "May" -> "may"

@rtoy

rtoy Jun 29, 2016

Contributor

"postMessage" -> <code>postMessage</code>

Typo: "May" -> "may"

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
<p>
postMessage May be called to send a message to the corresponding
<a>AudioWorkletProcessor</a> via the algorithm defined by the
Worker specification.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

A link to the work spec would be good. Don't know off-hand the appropriate magic to do this automatically (if even possible).

@rtoy

rtoy Jun 29, 2016

Contributor

A link to the work spec would be good. Don't know off-hand the appropriate magic to do this automatically (if even possible).

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Currently the respec guide is down, so I'll have to revisit this when the guide comes back on.

@hoch

hoch Jun 29, 2016

Member

Currently the respec guide is down, so I'll have to revisit this when the guide comes back on.

Show outdated Hide outdated index.html
AudioWorkletNodeOptions
</h2>
<p>
The AudioNodeOptions dictionary can be used for the custom

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

AudioNodeOptions -> <a><code>AudioNodeOptions</code></a>

Did you really mean AudioNodeOptions and not AudioWorkletNodeOptions?

@rtoy

rtoy Jun 29, 2016

Contributor

AudioNodeOptions -> <a><code>AudioNodeOptions</code></a>

Did you really mean AudioNodeOptions and not AudioWorkletNodeOptions?

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
The AudioNodeOptions dictionary can be used for the custom
initialization of <a>AudioNode</a> attributes in the
<a>AudioWorkletNode</a> constructor. Entries in this dictionary whose
names that correspond to <a>AudioParam</a>s in the class definition of

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"names that correspond" -> "names correspond"

@rtoy

rtoy Jun 29, 2016

Contributor

"names that correspond" -> "names correspond"

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
unsigned long numberOfInputs
</dt>
<dd>
Similar to <a>numberOfInputs</a> in <a>AudioNode</a>.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Should "similar" be "same"? "Similar" kind of suggests that it's somehow different.

Same comment applies to all of the following descriptions of the members.

Maybe just say these are used to initialize the corresponding attributes for an AudioNode. (Well, you can't actually set numberOfInputs/Outputs of any other AudioNode, so this needs to be phrased differently.)

@rtoy

rtoy Jun 29, 2016

Contributor

Should "similar" be "same"? "Similar" kind of suggests that it's somehow different.

Same comment applies to all of the following descriptions of the members.

Maybe just say these are used to initialize the corresponding attributes for an AudioNode. (Well, you can't actually set numberOfInputs/Outputs of any other AudioNode, so this needs to be phrased differently.)

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Yes, I think we still have a unsettled question on this part.

@hoch

hoch Jun 29, 2016

Member

Yes, I think we still have a unsettled question on this part.

Show outdated Hide outdated index.html
Similar to <a>numberOfOutputs</a> in <a>AudioNode</a>.
</dd>
<dt>
unsigned long channelCount

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

It would be nice to make AudioWorkletNodeOptions derive from AudioNodeChannelOptions/AudioNodeOptions so you don't have to describe these again. (But AudioNodeOptions isn't in the spec yet, but there is a PR for it.)

@rtoy

rtoy Jun 29, 2016

Contributor

It would be nice to make AudioWorkletNodeOptions derive from AudioNodeChannelOptions/AudioNodeOptions so you don't have to describe these again. (But AudioNodeOptions isn't in the spec yet, but there is a PR for it.)

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

ACK.

@hoch

hoch Jun 29, 2016

Member

ACK.

Show outdated Hide outdated index.html
</h2>
<p>
This interface is derived from <a>WorkletGlobalScope</a>
representing a special execution context in which an audio

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"representing" -> "and represents" might be a bit better.

@rtoy

rtoy Jun 29, 2016

Contributor

"representing" -> "and represents" might be a bit better.

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
generation, processing, and analysis of audio data directly using
JavaScript in the audio <a>rendering thread</a>. The user-supplied
script code is evaluated in this scope to define
<a>AudioWorkletProcessor</a>.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"to define" -> "to define an"

@rtoy

rtoy Jun 29, 2016

Contributor

"to define" -> "to define an"

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Done.

@hoch

hoch Jun 29, 2016

Member

Done.

Show outdated Hide outdated index.html
</dt>
<dd>
A string key that represents a class definition to be
registered. <strong>ISSUE</strong>: The conflict between

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Maybe create an issue and actually link to it?

@rtoy

rtoy Jun 29, 2016

Contributor

Maybe create an issue and actually link to it?

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Or maybe don't even say this at all in the spec?

@rtoy

rtoy Jun 29, 2016

Contributor

Or maybe don't even say this at all in the spec?

Show outdated Hide outdated index.html
registered. <strong>ISSUE</strong>: The conflict between
multiple class definitions under the same name needs to be
addressed. For the time being, WG’s resolution is to apply the
first-come-first- served policy.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"first- served" -> "first-served" (Remove space)

@rtoy

rtoy Jun 29, 2016

Contributor

"first- served" -> "first-served" (Remove space)

Show outdated Hide outdated index.html
</dt>
<dd>
<p>
This array contains <a>AudioParamDescriptors</a>, which are

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Move "s" out of the tag for AudioParamDescriptors.

@rtoy

rtoy Jun 29, 2016

Contributor

Move "s" out of the tag for AudioParamDescriptors.

Show outdated Hide outdated index.html
<p>
This array contains <a>AudioParamDescriptors</a>, which are
descriptors for each controllable parameter on an
<a>AudioNode</a>. This static property is referred in the

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"referred" -> "referenced"

@rtoy

rtoy Jun 29, 2016

Contributor

"referred" -> "referenced"

Show outdated Hide outdated index.html
descriptors for each controllable parameter on an
<a>AudioNode</a>. This static property is referred in the
construction of an <a>AudioWorkletNode</a> to create instances
of <a>AudioParam</a> in the node.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"of AudioParam" -> "of an AudioParam"

@rtoy

rtoy Jun 29, 2016

Contributor

"of AudioParam" -> "of an AudioParam"

Show outdated Hide outdated index.html
</dt>
<dd>
<p>
This getter provides an object contains the information of the

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"object contains" -> "object that contains"

@rtoy

rtoy Jun 29, 2016

Contributor

"object contains" -> "object that contains"

Show outdated Hide outdated index.html
<p>
This getter provides an object contains the information of the
associated <a>AudioContext</a> such as the sample rate and the
current playback time when queried.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Since AudioContextInfo object is described somewhere else, don't really need to describe here what it might contain. Leave this out.

@rtoy

rtoy Jun 29, 2016

Contributor

Since AudioContextInfo object is described somewhere else, don't really need to describe here what it might contain. Leave this out.

Show outdated Hide outdated index.html
</p>
</dd>
<dt>
readonly attribute AudioContextInfo contextInfo

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Is "Info" ok? Should we use the full word?

@rtoy

rtoy Jun 29, 2016

Contributor

Is "Info" ok? Should we use the full word?

This comment has been minimized.

@hoch

hoch Jun 29, 2016

Member

Good point. This never came up in the discussion yet.

@hoch

hoch Jun 29, 2016

Member

Good point. This never came up in the discussion yet.

Show outdated Hide outdated index.html
</dt>
<dd>
<p>
The onmessage handler is called whenever the

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

"onmessage" -> <code>onmessage</code>

@rtoy

rtoy Jun 29, 2016

Contributor

"onmessage" -> <code>onmessage</code>

Show outdated Hide outdated index.html
<dd>
<p>
The onmessage handler is called whenever the
<a>AudioWorkletNode</a> posts a node message back to the

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Remove "node"?

@rtoy

rtoy Jun 29, 2016

Contributor

Remove "node"?

Show outdated Hide outdated index.html
The onmessage handler is called whenever the
<a>AudioWorkletNode</a> posts a node message back to the
corresponding processor object on the audio <a>rendering
thread</a>.

This comment has been minimized.

@rtoy

rtoy Jun 29, 2016

Contributor

Leave out the phrase "on the audio..."? The processor object is already defined to be existing on the appropriate thread.

@rtoy

rtoy Jun 29, 2016

Contributor

Leave out the phrase "on the audio..."? The processor object is already defined to be existing on the appropriate thread.

Show outdated Hide outdated index.html
<li>Run the constructor of the
<a><code>AudioWorkletProcessor</code> subclass</a>. In this
constructor, The <code>options</code> parameter can be used
to initialize the state of the processor.

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

"processor" is a very overloaded term already. Maybe just reference the term you refer to here with a link ?

@padenot

padenot Jul 22, 2016

Member

"processor" is a very overloaded term already. Maybe just reference the term you refer to here with a link ?

Show outdated Hide outdated index.html
</ol>
</li>
<li>
<em>In the <code>window</code> scope</em>: Construct

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

We should use something more generic than window here. At some point, we'll want to initialize AudioContexts from a worker thread, and there is no window there. Maybe just reference the Global where it all started?

@padenot

padenot Jul 22, 2016

Member

We should use something more generic than window here. At some point, we'll want to initialize AudioContexts from a worker thread, and there is no window there. Maybe just reference the Global where it all started?

This comment has been minimized.

@rtoy

rtoy Jul 22, 2016

Contributor

Are we actually going to support WebAudio in a worker? I thought we
weren't, especially in v1.

On Fri, Jul 22, 2016 at 7:47 AM, Paul Adenot notifications@github.com
wrote:

In index.html
#869 (comment):

  •              constructor.
    
  •            </li>
    
  •            <li>Run the <a><code>AudioWorkletProcessor</code></a>
    
  •            constructor, passing a structured clone of the
    
  •            <code>options</code> parameter that was provided to
    
  •            <a><code>AudioWorkletNode</code></a>.
    
  •              <ol>
    
  •                <li>Run the constructor of the
    
  •                <a><code>AudioWorkletProcessor</code> subclass</a>. In this
    
  •                constructor, The <code>options</code> parameter can be used
    
  •                to initialize the state of the processor.
    
  •                </li>
    
  •              </ol>
    
  •            </li>
    
  •            <li>
    
  •              <em>In the <code>window</code> scope</em>: Construct
    

We should use something more generic than window here. At some point,
we'll want to initialize AudioContexts from a worker thread, and there is
no window there. Maybe just reference the Global where it all started?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WebAudio/web-audio-api/pull/869/files/b90832134ec0ca31b591dc5af332a76912a799de#r71890606,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAofPCiNc0UVoHNrKeSgl6M6QS4xm6Gcks5qYNfngaJpZM4JBSo7
.

Ray

@rtoy

rtoy Jul 22, 2016

Contributor

Are we actually going to support WebAudio in a worker? I thought we
weren't, especially in v1.

On Fri, Jul 22, 2016 at 7:47 AM, Paul Adenot notifications@github.com
wrote:

In index.html
#869 (comment):

  •              constructor.
    
  •            </li>
    
  •            <li>Run the <a><code>AudioWorkletProcessor</code></a>
    
  •            constructor, passing a structured clone of the
    
  •            <code>options</code> parameter that was provided to
    
  •            <a><code>AudioWorkletNode</code></a>.
    
  •              <ol>
    
  •                <li>Run the constructor of the
    
  •                <a><code>AudioWorkletProcessor</code> subclass</a>. In this
    
  •                constructor, The <code>options</code> parameter can be used
    
  •                to initialize the state of the processor.
    
  •                </li>
    
  •              </ol>
    
  •            </li>
    
  •            <li>
    
  •              <em>In the <code>window</code> scope</em>: Construct
    

We should use something more generic than window here. At some point,
we'll want to initialize AudioContexts from a worker thread, and there is
no window there. Maybe just reference the Global where it all started?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WebAudio/web-audio-api/pull/869/files/b90832134ec0ca31b591dc5af332a76912a799de#r71890606,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAofPCiNc0UVoHNrKeSgl6M6QS4xm6Gcks5qYNfngaJpZM4JBSo7
.

Ray

This comment has been minimized.

@hoch

hoch Aug 4, 2016

Member

Although we're not shipping v1 with the worker support, I think the 'global scope' is better than window.

@hoch

hoch Aug 4, 2016

Member

Although we're not shipping v1 with the worker support, I think the 'global scope' is better than window.

Show outdated Hide outdated index.html
information from the processor's
<a><code>parameterDescriptors</code></a>.
<ol>
<li>Initialize the value of AudioParam objects with

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

Markup on AudioParam.

@padenot

padenot Jul 22, 2016

Member

Markup on AudioParam.

Show outdated Hide outdated index.html
the key that matches the name of AudioParam object and
assign the value to it. Any key does not match the name of
<a><code>AudioParam</code></a> object and anything other
than <code>Number</code> for the value are ignored.

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

This would be better spelled out precisely with an algorithm.

@padenot

padenot Jul 22, 2016

Member

This would be better spelled out precisely with an algorithm.

Show outdated Hide outdated index.html
The <dfn>AudioWorkletProcessor</dfn> interface
</h2>
<p>
This interface represents an audio processing module that runs on

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

"module" already means something in EcmaScript, best to not use it here.

@padenot

padenot Jul 22, 2016

Member

"module" already means something in EcmaScript, best to not use it here.

Show outdated Hide outdated index.html
<p>
This interface represents an audio processing module that runs on
the audio <a>rendering thread</a>. It is defined in an
<a><code>AudioWorkletGlobalScope</code></a> and the definition of

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

Maybe "It lives in an AudioWorkletGlobalScope".

@padenot

padenot Jul 22, 2016

Member

Maybe "It lives in an AudioWorkletGlobalScope".

Show outdated Hide outdated index.html
<p>
This getter returns an array containing
<a>AudioParamDescriptor</a>s, which are descriptors for each
controllable parameter on an <a>AudioNode</a>. This static

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

s/controllable parameter/AudioParam/

@padenot

padenot Jul 22, 2016

Member

s/controllable parameter/AudioParam/

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

Does static have a meaning in the Web Platform, or is it just a C++ thing here ?

@padenot

padenot Jul 22, 2016

Member

Does static have a meaning in the Web Platform, or is it just a C++ thing here ?

This comment has been minimized.

</dt>
<dd>
<p>
The <code>onmessage</code> handler is called whenever the

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

When is it called with respect to the processing and other computations that are made in the rendering thread, when a message is sent ?

@padenot

padenot Jul 22, 2016

Member

When is it called with respect to the processing and other computations that are made in the rendering thread, when a message is sent ?

This comment has been minimized.

@hoch

hoch Aug 4, 2016

Member

Perhaps it would be better to point 'processing model' section? Basically this can only happen before/after the render quantum. So technically the expression 'whenever' is incorrect them.

@hoch

hoch Aug 4, 2016

Member

Perhaps it would be better to point 'processing model' section? Basically this can only happen before/after the render quantum. So technically the expression 'whenever' is incorrect them.

This comment has been minimized.

@hoch

hoch Aug 16, 2016

Member

If I have to change the 'processing model' section, I believe it has to be a different PR.

@hoch

hoch Aug 16, 2016

Member

If I have to change the 'processing model' section, I believe it has to be a different PR.

Show outdated Hide outdated index.html
<dd>
<p>
This method gets executed isochronously by the audio
<a>rendering thread</a>.

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

It is called synchronously by the rendering thread, that executes in an isochronous fashion.

@padenot

padenot Jul 22, 2016

Member

It is called synchronously by the rendering thread, that executes in an isochronous fashion.

Show outdated Hide outdated index.html
<p>
It may be called to send a message to the
<a><code>AudioWorkletNode</code></a>, via the algorithm defined
by the Worker specification.

This comment has been minimized.

@padenot

padenot Jul 22, 2016

Member

We don't have a traditional event loop inside the rendering thread, so the definition in the Worker specification does not work, since it relies on having an event loop. We have something very similar, but maybe a few adaptations have to be made.

@padenot

padenot Jul 22, 2016

Member

We don't have a traditional event loop inside the rendering thread, so the definition in the Worker specification does not work, since it relies on having an event loop. We have something very similar, but maybe a few adaptations have to be made.

This comment has been minimized.

@hoch

hoch Aug 4, 2016

Member

Agreed. It seems like we need to adapt 'processing model' section to include this message passing mechanism between the control thread and the rendering thread.

@hoch

hoch Aug 4, 2016

Member

Agreed. It seems like we need to adapt 'processing model' section to include this message passing mechanism between the control thread and the rendering thread.

Show outdated Hide outdated index.html
DOMString name
</dt>
<dd>
Represents the name of a parameter. An NotSupportedError