-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add underscore to audio engine v2 public internal class members #16375
Add underscore to audio engine v2 public internal class members #16375
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
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 renames a number of internal properties and methods in the Audio Engine V2 codebase by adding an underscore prefix so that the public API remains unchanged while internal members are clearly separated. Key changes include replacing references to engine.audioContext with engine._audioContext, renaming getters from inNode/outNode to _inNode/_outNode, and updating initialization methods (init → _init).
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/dev/core/src/AudioV2/webAudio/webAudioMainOut.ts | Renamed engine property access and inNode getter to updated underscore names. |
packages/dev/core/src/AudioV2/webAudio/subNodes/webAudioAnalyzerSubNode.ts | Updated usage of engine audioContext and inNode getter to their underscore counterparts. |
packages/dev/core/src/AudioV2/webAudio/webAudioEngine.ts | Replaced calls to init and node addition/removal methods with their underscore-prefixed versions and updated audioContext references. |
packages/dev/core/src/AudioV2/webAudio/subNodes/volumeWebAudioSubNode.ts, stereoWebAudioSubNode.ts, spatialWebAudioSubNode.ts | Updated constructors and getter names to access engine._audioContext and _inNode/_outNode consistently. |
packages/dev/core/src/AudioV2/webAudio/webAudioStaticSound.ts & webAudioStreamingSound.ts | Updated initialization methods and node connectivity to use underscore-prefixed internal members. |
packages/dev/core/src/AudioV2/webAudio/webAudioBus.ts, subProperties/spatialWebAudioListener.ts, abstractAudio/subNodes/spatialAudioSubNode.ts, webAudioBusAndSoundSubGraph.ts, webAudioBaseSubGraph.ts, webAudioNode.ts | Applied consistent renaming for internal members and getter interfaces across various modules. |
Comments suppressed due to low confidence (2)
packages/dev/core/src/AudioV2/webAudio/webAudioStaticSound.ts:506
- Consider verifying if the AudioBufferSourceNode should be created with this._sound._audioContext instead of this._sound.audioContext for consistency with the underscore naming convention.
this._sourceNode = new AudioBufferSourceNode(this._sound.audioContext, { buffer: this._sound.buffer._audioBuffer });
packages/dev/core/src/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.ts:136
- [nitpick] Verify that renaming the internal input node to _inputNode and exposing it via the _inNode getter achieves the intended design, and consider whether a more consistent naming approach might improve clarity.
if (this._inputNode !== inNode) {
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/16375/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/16375/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/16375/merge#BCU1XR#0 |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
Makes no changes to the documented public API.