Skip to content

test(libSceAudioOut): cover speaker array creation and its ambisonics coefficients - #11584

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
milescoviello:test/audioout2-speaker-array
Nov 2, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
milescoviello:test/audioout2-speaker-array

Conversation

@milescoviello

@milescoviello milescoviello commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What

A new tests/AudioOut2SpeakerArray.cpp (registered after the AudioOut2 latency test) covers sceAudioOut2SpeakerArrayCreate and sceAudioOut2GetSpeakerArrayAmbisonicsCoefficients. Creation rejects a null handle or parameter block, 0 or 33 speakers, memory too small for the array and misaligned memory, without writing the handle, and otherwise places the array in the memory given. For four speakers on the horizontal plane at 0, 90, 180 and 270 degrees, the W channel splits 0.25 to each speaker, the first-order Y and X channels follow the sine and cosine of each azimuth (±0.25), and a second-order channel decodes to 0, as four speakers decode only the first order. A channel without the ambisonics flag, a sixth-order channel, a wrong coefficient count, null coefficients and memory holding no array are rejected.

Until now no test called it.

Changed: core/libs/prx/libSceAudioOut/CMakeLists.txt, core/libs/prx/libSceAudioOut/tests/AudioOut2SpeakerArray.cpp. Test only, no change to the library.

Tested

Linux (Ubuntu 26.04, GCC 15.2), Release: cmake --build build --target audio_out2_speaker_array_tests and ctest -R '^audio_out2_speaker_array$' --repeat until-fail:3 pass on this branch, which is current main plus the test. tools/check_conventions.py --base upstream/main passes.

Windows (run by maskym: Windows 11, i7-12700K, WinLibs GCC 15.2.0, Release, with other open PRs merged in): audio_out2_speaker_array passes (comment).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

… coefficients

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/prx/libSceAudioOut/CMakeLists.txt
PR 12863 core/libs/prx/libSceAudioOut/CMakeLists.txt

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The four-speaker geometry exercises the expected SN3D W/Y/X values and the unsupported second-order zeroing for this implementation; the invalid flag/order/count/null-handle cases are also covered. I manually checked the overlap bot warning for #5021: its AudioOut CMake change only selects the SDL link dependency near the top of the file; it does not overlap this test registration hunk, so no dependency is needed. The author reports three passing Linux runs and conventions; hosted eligibility, conventions, intake, labels and report pass. Product jobs are skipped by path policy. I did not rerun the test locally.

@maskym

maskym commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Windows result for head 9773824265, merged into main 2ee8e9751a (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

The tree also carried the open PRs #11172, #10780, #10729, #11614, #10631, #10582, #11547, #11572, all merged cleanly, so the run is a joint one; the tests of this PR are audio_out2_speaker_array. Together with the whole libc, CesCs, Font, FreeType, LibreSsl3 and NpUniversalDataSystem suites those tests belong to: 160/160 passed, this PR's in 0.05 s; the AudioOut suite separately 21/21. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@milescoviello

Copy link
Copy Markdown
Contributor Author

@maskym thanks for the Windows run. I've added it to the Tested section.

AI-assisted: yes (Claude Code)

@THEMANnt THEMANnt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed 9773824265879cfdfebb134fe7c1f5bb13f70f90 — approve. The speaker-array fixture checks rejected creation without writing a handle, placement in caller memory, known first-order coefficient values, unsupported channels/counts and null/invalid arrays. This is CPU coefficient validation; no audio device playback was performed.

Windows/GCC 15.3 Release native validation from pinned sources: head: 1 passed, 0 skipped; audio_out2_speaker_array; author base was source-compared: production sources are unchanged; its runtime was not built or executed for this review. This changes test coverage, not production behavior, so an old-production failure is not required. The build reuses matching dependency source pins and the existing FFmpeg package; no full product or game execution is claimed.

@oneandonlydean
oneandonlydean merged commit 0160b5e into boykopovar:main Nov 2, 2026
13 checks passed
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.

5 participants