-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add WebAudio node and microphone input sound sources to AudioEngineV2 #16596
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for using any WebAudio node as a sound source in AudioEngineV2 and implements a new microphone input sound source.
- Updated type definitions to include "SoundSource"
- Introduced CreateSoundSourceAsync methods in both test utilities and production code
- Added a new API for creating microphone sound sources in the WebAudio engine
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/tools/tests/test/audioV2/utils/audioV2.utils.ts | Updated type definitions and method signatures to support "SoundSource". |
packages/tools/tests/test/audioV2/soundSource.*.test.ts | Added new tests for volume, stereo, and spatial properties for "SoundSource". |
packages/tools/babylonServer/public/audiov2-test.js | Refactored sound creation logic in CreateAbstractSoundAndOutputNodeAsync and added CreateSoundSourceAsync. |
packages/dev/core/src/AudioV2/webAudio/webAudioStaticSound.ts | Minor catch refinement in error handling. |
packages/dev/core/src/AudioV2/webAudio/webAudioSoundSource.ts | New class implementation for sound source based on WebAudio nodes. |
packages/dev/core/src/AudioV2/webAudio/webAudioEngine.ts | Added methods for creating microphone and general sound sources. |
packages/dev/core/src/AudioV2/abstractAudio/* | Updated abstract sound and sound source definitions to reflect new APIs. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Co-authored-by: Copilot <[email protected]>
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16596/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/16596/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/16596/merge#BCU1XR#0 |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
This change enables using any WebAudio node as a sound source in AudioEngineV2, and uses this new feature to implement microphone input sound sources.