Closed Bug 1007778 Opened 6 years ago Closed 5 years ago

Add a devtools API for disabling effect processing AudioNodes

Categories

(Core :: Web Audio, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: jsantell, Assigned: ehsan)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 2 obsolete files)

AudioNode's should be able to be "circumvented" or disabled, as if all incoming connections routed directly to all of it's outgoing connections.
How possible would it be to have a chrome-only way of disabling an AudioNode, as in the audio stream flows through the node being unaltered?
Flags: needinfo?(paul)
Flags: needinfo?(ehsan)
Shouldn't be that hard.  I'll try to write it up during the weekend.
Assignee: nobody → ehsan
Flags: needinfo?(ehsan)
Component: Developer Tools: Web Audio Editor → Web Audio
Product: Firefox → Core
Amazing :D
What semantics do you want for ChannelMergerNode and ChannelSplitterNode in this mode?  Supporting the other node types should be very easy...
For utility nodes (merge/splitter/analyser/processor), probably nothing happens (processor's onaudioprocess event isn't fired). The main thing that'd be useful is for effect/transformation nodes to not alter the signal.

For source nodes, I have another bug (bug 1007776) for "muting" source nodes, so if this is similar to that for source nodes, great!

My ad hoc classification of nodes:
http://jsantell.github.io/browser-dance-party-slides/#/14
Clearing NEEDINFO, let me know if you need anything from me.
Flags: needinfo?(paul)
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #5)
> For utility nodes (merge/splitter/analyser/processor), probably nothing
> happens (processor's onaudioprocess event isn't fired). The main thing
> that'd be useful is for effect/transformation nodes to not alter the signal.

OK, firstly, "nothing" is not an option for the merger and splitter nodes.  These nodes have more than one input and output ports respectively, and they need to output something sensible.  I suggest that we keep them work the way they usually do, by merging or splitting the channels.

I'll stop firing the events for the analyser and script processor nodes as well.

> For source nodes, I have another bug (bug 1007776) for "muting" source
> nodes, so if this is similar to that for source nodes, great!

Source nodes probably need to be handled differently, so I'll leave them out of this patch.
Attachment #8474540 - Attachment is obsolete: true
Comment on attachment 8474543 [details] [diff] [review]
Add a devtools API to make some Web Audio nodes pass through their inputs

Jordan, do you mind testing this patch please?  It adds a boolean chromeonly passThrough attribute to some of the AudioNodes.  Please see the *.webidl changes in the patch to see which ones.

Let me know how well this works for you.  I will need to write more tests before this is ready for review though.
Attachment #8474543 - Flags: feedback?(jsantell)
Summary: Disabling AudioNode's in web audio editor → Add a devtools API for disabling effect processing AudioNodes
Testing this out now -- For channel splitters/mergers, sorry, I meant "do nothing" as in "no changes to how it normally works", so this sounds great :)

Will report back!
Comment on attachment 8474543 [details] [diff] [review]
Add a devtools API to make some Web Audio nodes pass through their inputs

Review of attachment 8474543 [details] [diff] [review]:
-----------------------------------------------------------------

A quick test case of the tools server-side interfacing with this worked great! Will add the DT bug as a dependent
Attachment #8474543 - Flags: feedback?(jsantell) → feedback+
Attachment #8474543 - Attachment is obsolete: true
Comment on attachment 8474773 [details] [diff] [review]
Add a devtools API to make some Web Audio nodes pass through their inputs

Requesting review from roc on the patch, and a rubber-stamp from Olli on the *.webidl changes.  Note that this patch doesn't expose anything to the Web.
Attachment #8474773 - Flags: review?(roc)
Attachment #8474773 - Flags: review?(bugs)
Comment on attachment 8474773 [details] [diff] [review]
Add a devtools API to make some Web Audio nodes pass through their inputs

I would have added one [NoInterfaceObject] interface with [ChromeOnly] passThrough, and made the
other stuff to implement that, if possible.
Would be a bit simpler, less copy-pasting.
If possible do that, otherwise the patch is fine too.
Attachment #8474773 - Flags: review?(bugs) → review+
Blocks: 1007776
Depends on: 1055511
https://hg.mozilla.org/mozilla-central/rev/2ad221f9aca9
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
QA Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.