feat(ngs2): route custom submixer buffers through Gain #10851
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10851"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-10-25T05:03:27Z.
What
Custom submixers currently use one sample buffer for inputs, output ports and Gain. Add 1-4 per-voice buffers for custom submixers with zero modules or one Gain stage: inputs feed matching buffers, each grain clears unwritten samples, ports select their configured source, and Gain overwrites its selected destination. Broader chains and module routing stay unsupported until their processing-order contract is established.
Correct Gain's 37 unclamped levels, previous-level
i/Nramps, equal-gain fast path, steady zero clearing and steady unity copying. Invalid Gain positions return0x804A835Aand stop linked parameter processing. Contracts follow the PS5 12.70 module report and later findings; KytyPS5 corroborates port selection. No new console measurement is claimed.Unverified Gain initialization/lifecycle, callback setup/route changes and nonfinite integer rendering retain their runtime refusals and debt entries. Sampler Gain, broader custom chains and channel conversion remain outside this milestone. Tests exercise supported operations rather than requiring unimplemented cases to keep throwing.
Dean's requested follow-up is implemented at
c40ba98945e845b950ecca7819c472942757ad30. Merged main9b520147fbeddff4357d6e8f92e5235a16342171in0c3f104067239abd5358b8d1992295f9da7b27ee; then removed the unsupported exception assertions. CustomSafety keeps ordinary custom/upstream callbacks, explicitly configured Gain, route changes before rendering, callback counts, port metadata and literal output checks in both libraries. Gain keeps finite integer controls and its float/numeric/ramp coverage. Ngs2Custom's supported coverage is retained.The earlier proposed queue's #9926, #10127 and #10410 are now in main, including #10410's PCM-fixture lifetime repair. The merge preserves their PLAY/list-error propagation, PCM widths/accounting, mastering gain and all tests alongside this PR's Gain early errors and callback safeguards. No open prerequisite is required.
#11352 independently proposes the same Gain-ramp correction already included here; apply that correction once and preserve the combined coverage whichever PR lands first. Custom Reverb #10599, experimental PCM retention #5548, and newer custom-module/channel/codec work remain separate. Their later compositions must preserve each topic's scope, state ownership and test registrations and be validated at their actual heads. The refreshed overlap report and independent reviews record current pinned references; no sibling branch was edited or combined-runtime result claimed.
Tested
Windows 11 Pro 10.0.26200; WinLibs MinGW-w64 GCC 15.2.0 r7; Ninja Release, BUILD_TESTING=ON, SPIRV-Tools enabled. Latest exact head:
c40ba98945e845b950ecca7819c472942757ad30, main ancestor9b520147fbeddff4357d6e8f92e5235a16342171.cmake --build build --target <both libraries and NGS2 test targets> --parallel 2.ctest --test-dir build -R '^ngs2_' --output-on-failure --parallel 2: 30/30 passed, zero skips, 2.95 seconds. This includes all ten supported CustomSafety cases, Gain/Routing against both libraries, native/core PCM and native voice events.python -B tools/check_conventions.py --base origin/mainand exact-base whitespace checks pass.python -B core/libs/tests/test_public_headers.py --audit-only: 368 libraries/12,231 exports verified; this is a declaration audit, not a compiled-header run.The former unsupported-refusal tests and their historical mutation results are not retained-test evidence. No new title, GPU, original-module or PS5 run was performed for this follow-up. The earlier
a43a610production smoke reached a capped Dead Cells loading screen; it establishes no latest-head title result, audio fidelity, callback timing, GPU validation or performance. Full-suite/hosted runtime checks and unselected external compositions are not claimed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T05:12:35Z.
Review: COMMENTED
Reviewed the exact-head follow-up
e50cbf349d4e0af8647627640df9c8c9ddf610b7againsta43a610bbf8a8c5b9e7499dd2631247a8597a551. This follow-up is test-only: callback safety cases now require the exact refusal and a single callback invocation, and the integer-output case checks finite positive/negative gain plus nonfinite rejection with output sentinels unchanged. I found no issue in these added assertions. I did not build or run them locally; the 27/27 NGS2 results in the description are author-reported. This is not a full review or approval of the composed change: the PR remains draft while overlap owners coordinate, and the body says no combined branch has been validated.