kr1
kr1

Reputation: 7485

web audio api: how to inspect the audio graph?

The Web Audio Api specification says:

[...] AudioContext interface, which contains an audio signal graph representing connections betweens AudioNodes.

I have a project with +/- 30 nodes connected nodes.
I am trying to write tests to check if the setup of the graph is correct. Therefore I need to inspect the resulting graph.
However, I have not been able to access/inspect the final graph, nor to find information on how to do it.

Upvotes: 4

Views: 1344

Answers (3)

dangerChihuahua007
dangerChihuahua007

Reputation: 20895

You can use the Web Audio Inspector Chrome extension.

enter image description here

Upvotes: 5

Ben
Ben

Reputation: 10146

Firefox has a Web Audio inspector that you can use for this. Enable it in your developer tools and you can get a graph of all the connected nodes. You can even modify the properties of nodes such as biquad filters.

enter image description here

https://hacks.mozilla.org/2014/06/introducing-the-web-audio-editor-in-firefox-developer-tools/

Upvotes: 4

cwilso
cwilso

Reputation: 13908

There actually is no way to directly inspect the graph; you need to maintain your own pointers, etc. to inspect the graph. This is partly to encourage/enable good garbage collection behavior.

Upvotes: 1

Related Questions