简体   繁体   中英

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.

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.

在此输入图像描述

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM