Implement ConstantSourceNode

RESOLVED FIXED in Firefox 52

Status

()

defect
P1
normal
Rank:
18
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: padenot, Assigned: dminor)

Tracking

({dev-doc-complete})

Trunk
mozilla52
Points:
---

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(3 attachments)

Reporter

Description

3 years ago
This is an AudioNode that outputs the value of its AudioParam.

Spec changes at https://github.com/webaudio/web-audio-api/commit/85a813813f38ea5a65045ec9003b3ed8928f4b9a.
Reporter

Updated

3 years ago
Rank: 18
Assignee

Updated

3 years ago
Assignee: nobody → dminor
Assignee

Updated

3 years ago
Keywords: dev-doc-needed
Assignee

Updated

3 years ago
Status: NEW → ASSIGNED
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 5

3 years ago
mozreview-review
Comment on attachment 8801790 [details]
Bug 1308432 - Add webidl for ConstantSourceNode;

https://reviewboard.mozilla.org/r/86424/#review85206

::: dom/media/webaudio/AudioContext.cpp:256
(Diff revision 1)
>  }
>  
> +already_AddRefed<ConstantSourceNode>
> +AudioContext::CreateConstantSource(ErrorResult& aRv)
> +{
> +  if (CheckClosed(aRv)) {

The spec doesn't seem to have this kind of check, but since we have it elsewhere and I don't know the background, not going to complain.
Attachment #8801790 - Flags: review?(bugs) → review+
Reporter

Comment 6

3 years ago
(In reply to Olli Pettay [:smaug] from comment #5)
> Comment on attachment 8801790 [details]
> Bug 1308432 - Add webidl for ConstantSourceNode;
> 
> https://reviewboard.mozilla.org/r/86424/#review85206
> 
> ::: dom/media/webaudio/AudioContext.cpp:256
> (Diff revision 1)
> >  }
> >  
> > +already_AddRefed<ConstantSourceNode>
> > +AudioContext::CreateConstantSource(ErrorResult& aRv)
> > +{
> > +  if (CheckClosed(aRv)) {
> 
> The spec doesn't seem to have this kind of check, but since we have it
> elsewhere and I don't know the background, not going to complain.

From the spec [0]:

> "Attempts to create new Nodes on the AudioContext will throw InvalidStateError"

[0]: https://webaudio.github.io/web-audio-api/#idl-def-AudioContextState.closed
Reporter

Comment 7

3 years ago
mozreview-review
Comment on attachment 8801791 [details]
Bug 1308432 - Implement ConstantSourceNode;

https://reviewboard.mozilla.org/r/86426/#review85838
Attachment #8801791 - Flags: review?(padenot) → review+
Reporter

Comment 8

3 years ago
mozreview-review
Comment on attachment 8801789 [details]
Bug 1308432 - Add missing includes to PannerNode.h and PannerNode.cpp;

https://reviewboard.mozilla.org/r/86422/#review85830
Attachment #8801789 - Flags: review?(padenot) → review+

Comment 9

3 years ago
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/92a0dbf7b707
Add missing includes to PannerNode.h and PannerNode.cpp; r=padenot
https://hg.mozilla.org/integration/autoland/rev/1982ca04dbf4
Add webidl for ConstantSourceNode; r=smaug
https://hg.mozilla.org/integration/autoland/rev/0317358641df
Implement ConstantSourceNode; r=padenot
sorry Dan, backout for bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=5314625&repo=autoland
Flags: needinfo?(dminor)

Comment 11

3 years ago
Backout by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6e765a5d7110
Backed out changeset 0317358641df 
https://hg.mozilla.org/integration/autoland/rev/b8668266c5f0
Backed out changeset 1982ca04dbf4 
https://hg.mozilla.org/integration/autoland/rev/f84e984210c9
Backed out changeset 92a0dbf7b707 for bustage on a CLOSED TREE
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Assignee

Updated

3 years ago
Flags: needinfo?(dminor)

Comment 18

3 years ago
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c249f55213b6
Add missing includes to PannerNode.h and PannerNode.cpp; r=padenot
https://hg.mozilla.org/integration/autoland/rev/61c7dc758b5b
Add webidl for ConstantSourceNode; r=smaug
https://hg.mozilla.org/integration/autoland/rev/1dba8e563e1c
Implement ConstantSourceNode; r=padenot

Comment 19

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c249f55213b6
https://hg.mozilla.org/mozilla-central/rev/61c7dc758b5b
https://hg.mozilla.org/mozilla-central/rev/1dba8e563e1c
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Documentation updates should now be complete. In addition to listing ConstantSourceNode on Firefox 52 for developers, I also mention the addition of AudioScheduledSourceNode (its parent interface) and the fact that other interfaces were updated to also be based on AudioScheduledSourceNode. See below for a list of the main pages which were updated; there were other pages changed in small ways as a side effect but were not tracked.

Pages added:

https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode
https://developer.mozilla.org/en-US/docs/Web/API/AudioScheduledSourceNode/onended

https://developer.mozilla.org/en-US/docs/Web/API/ConstantSourceNode/ConstantSourceNode
https://developer.mozilla.org/en-US/docs/Web/API/ConstantSourceNode/offset

https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Controlling_multiple_parameters_with_ConstantSourceNode

Pages updated:

https://developer.mozilla.org/en-US/docs/Web/API/ConstantSourceNode
https://developer.mozilla.org/en-US/docs/Web/API/ConstantSourceNode/offset (now redirects to AudioScheduledSourceNode/offset)
https://developer.mozilla.org/en-US/docs/Web/API/ConstantSourceNode/start (now redirects to AudioScheduledSourceNode/start)
https://developer.mozilla.org/en-US/docs/Web/API/ConstantSourceNode/stop (now redirects to AudioScheduledSourceNode/stop)

Some of the updates above also include changes to deal with the change of base class for several node types to be AudioScheduledSourceNode. In addition, these pages were similarly revised:

https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode

These pages were updated because I saw they needed help while working on the above changes:

https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/OscillatorNode
https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/type
https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/setPeriodicWave
https://developer.mozilla.org/en-US/docs/Web/API/PeriodicWave
https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave
https://developer.mozilla.org/en-US/docs/Web/API/PeriodicWave/PeriodicWave

This page was added to help explain and understand some points:

https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Simple_synth

Example snippets and explanations added (or determined to be unneeded on the following pages):

https://developer.mozilla.org/en-US/docs/Web/API/ConstantSourceNode
https://developer.mozilla.org/en-US/docs/Web/API/ConstantSourceNode/ConstantSourceNode
https://developer.mozilla.org/en-US/docs/Web/API/ConstantSourceNode/offset

On top of all that, I updated a couple of MDN’s database macros to ensure that their information on this API is up to date.
You need to log in before you can comment on or make changes to this bug.