Skip to content

fix(ngs2): accept common sampler voice state queries - #17145

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
THEMANnt:fix/ngs2-common-voice-state-refresh
Nov 12, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
THEMANnt:fix/ngs2-common-voice-state-refresh

Conversation

@THEMANnt

@THEMANnt THEMANnt commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

What

In libSceNgs2, accept an eight-byte Ngs2VoiceState buffer for sampler voices. Copy the common fields from the same sampler state used by the full-size query. The shared test checks that the returned fields match and that the short query leaves the surrounding bytes intact.

The Binding of Isaac: Repentance (PPSA03311) polls this form for streamed audio. The previous size check rejected the poll. The short query's behavior on PS4 hardware remains unmeasured and is recorded in technical debt.

Tested

  • Windows 11, WinLibs GCC 15.2, Release. The new assertion failed on upstream 990481cdbf with only the regression test added. With the implementation, ngs2_core_render, ngs2_core_ps4_voice_state and ngs2_render passed. The three tests also passed after rebasing onto 105c9e4d91.
  • The Binding of Isaac: Repentance v01.000.000 on Windows, using 990481cdbf for both runtimes. Gameplay effects continued after the background music cut out on the baseline. The background music kept playing in Basement I with the fix. libSceNgs2.prx was the only library swapped. Both runtimes preserved the same host-only kernel symbol during packaging.

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
  • 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

@github-actions

github-actions Bot commented Nov 8, 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 1384 core/libs/prx/libSceNgs2.native/src/Voice.cpp
PR 5548 core/libs/prx/libSceNgs2.native/src/Voice.cpp
core/libs/prx/libSceNgs2.native/tests/Ngs2Render.cpp
docs/dev/debt/libSceNgs2.native.md
PR 14212 docs/dev/debt/libSceNgs2.native.md

@THEMANnt

THEMANnt commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

I manually checked the four comparisons flagged by the overlap bot against this PR at 6ae65207fe.

I found no dependency for the sampler change at these heads.

@JJenkx

JJenkx commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 6ae65207fe, merged onto main 105c9e4d91 (6ae65207fe, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • ngs2_core_render passes in 3 of 3 runs, none skipped.

AI-assisted: yes.

@coptergui-ops coptergui-ops 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 at current head. sceNgs2VoiceGetState now accepts the PS4 8-byte Ngs2VoiceState form for sampler voices (guarded by PS4_LIBRARY and exact size), fills a local Ngs2SamplerVoiceState through the same state logic as the full-size query, writes back only the common 8 bytes, and leaves surrounding bytes intact; shared test compares both sizes field-by-field. Debt records the Isaac Repentance (PPSA03311) polling site. Overlap verdicts: PR 1384 (stale base, conflicts with main) edits the same GetState function but a different rack case (REVERB) and adds the opposite full-size-only check - rebase it over the rewritten GetState or close after this merges; PRs 5548, 12107, 14212 share only other debt bullets, different entries, no shared lines. Conventions checker: no new findings from this diff (libkernel.md 1385-char warning is a pre-existing main entry, flagged identically across this wave).

@oneandonlydean
oneandonlydean merged commit 5775c18 into boykopovar:main Nov 12, 2026
14 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.

4 participants