Skip to content

LibWeb/WebAudio: Implement AudioNode::connect() #4831

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Prospero23
Copy link
Contributor

Sets up the basic infrastructure for the audio node graph and implements the AudioNode connect() method with its related overides. AudioNodes store vectors of AudioNodeConnections and AudioParamConnections to represent links between nodes.

@Prospero23
Copy link
Contributor Author

The existing AudioNode WPTs just check if connect() returns the proper value or correct exception. They do not confirm that the internal C++ vectors are actually being updated when nodes are added/deleted from the audio graph.

Since the Web Audio spec doesn't expose any API on AudioNode to enumerate current connections, I am not sure the best way to write a C++ test that makes sure state is actually being updated on add or removal of a node.

The best way I can think of is to just add some debug/test methods to the public API to check to see that connections (and disconnections) are actually made by looking at the private m_input_connections, m_output_connections, and m_param_connections.

If that seems like a good idea, I am happy to add it to this PR!

@Prospero23 Prospero23 force-pushed the add-connect-to-audio-node branch 2 times, most recently from b6e6d9e to 26daf27 Compare May 21, 2025 15:34
Sets up the basic infrastructure for the audio node graph and
implements the AudioNode `connect()` method with its related overides.
AudioNodes store vectors of AudioNodeConnections and
AudioParamConnections to represent links between nodes.
@Prospero23 Prospero23 force-pushed the add-connect-to-audio-node branch from 26daf27 to 8552276 Compare May 29, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant