-
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 static and streaming sound playback tests #16477
Add static and streaming sound playback tests #16477
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.
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
packages/tools/tests/test/audioV2/common/abstractSound.common.ts:14
- The variable 'audioTestConfig' is referenced without any visible import or definition in this file. Ensure it is imported or defined in the current scope.
const sound = await AudioV2Test.CreateAbstractSoundAsync(soundType, audioTestConfig.pulsed3CountSoundFile);
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/16477/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/16477/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/16477/merge#BCU1XR#0 |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
These tests are not shared with streaming sound playback because the options used are not supported by streaming sounds.
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.
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
They are typically values transitioning across the zero line when the polarity changes, and are not representative of the actual pulse volume. Ignoring them reduces flaky test results.
WebGL2 visualization test reporter: |
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.
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (3)
packages/tools/tests/test/audioV2/utils/audioV2.utils.ts:221
- The exclusion of the first and last samples in the average volume calculation uses hard-coded offsets. Please add a clarifying comment or refactor to define these exclusion boundaries with named constants for clarity.
for (let j = pulseStartIndex + 1; j < pulseEndIndex - 1; j++) {
packages/tools/babylonServer/public/audiov2-test.js:116
- The state constant has been changed from BABYLON.SoundState.STOPPED to BABYLON.SoundState.Stopped; please verify that this matches the Babylon API convention to avoid potential state-check issues.
if (sound.state !== BABYLON.SoundState.Stopped) {
packages/tools/tests/test/audioV2/shared/abstractSound.playback.ts:120
- [nitpick] The TODO comment indicates a pending refactor for test organization; consider relocating or resolving this TODO to improve code clarity and maintainability.
// TODO: Move this somewhere else. It doesn't make sense to have it here.
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
Adds static and streaming sound playwright playback tests, including a shared test module for tests common to both types of sounds, and some helpful utility code.
Note that some of the changes in this PR are trivial and should be viewed with whitespace changes hidden.