Skip to content

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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

docEdub
Copy link
Contributor

@docEdub docEdub commented May 13, 2025

This change enables using any WebAudio node as a sound source in AudioEngineV2, and uses this new feature to implement microphone input sound sources.

Copy link
Contributor

@Copilot Copilot AI left a 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.

@bjsplat
Copy link
Collaborator

bjsplat commented May 13, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented May 13, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented May 13, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented May 13, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented May 13, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented May 13, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented May 13, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented May 13, 2025

@docEdub docEdub enabled auto-merge (squash) May 13, 2025 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants