Skip to content

Introduction of the AudioDestinationNode module #83

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

Merged
merged 1 commit into from
Apr 19, 2025

Conversation

julien-deoux
Copy link
Contributor

AudioDestinationNode is a subclass of AudioNode with no constructor and no extra method. The only effective difference is the maxChannelCount instance property, which is already covered by the audioDestinationNode type in the WebAudioAPI module.

This PR allows for AudioContext's destination property to be used like an AudioNode, especially being connected to by other nodes since this is the only way to output audio to speakers.

For more information, check MDN

AudioDestinationNode is a subclass of AudioNode with no constructor and
no extra method. The only effective difference is the `maxChannelCount`
instance property, which is already covered by the
`audioDestinationNode` type in the `WebAudioAPI` module.

This PR allows for `AudioContext`'s `destination` property to be used
like an `AudioNode`, especially being connected to by other nodes since
this is the only way to output audio to speakers.

For more information, check
[MDN](https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode)
@julien-deoux julien-deoux force-pushed the AudioDestinationNode branch from dfc5b1f to 966e80f Compare April 19, 2025 04:58
Copy link
Collaborator

@nojaf nojaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the unit test!

https://www.npmjs.com/package/@rescript/webapi/v/0.1.0-experimental-45ad9b8 should contain you fixes!

@nojaf nojaf merged commit 45ad9b8 into rescript-lang:main Apr 19, 2025
2 checks passed
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.

2 participants