Repository navigation
fix(libSceNgs2.native): accept a reverb voice with different input and output channel counts - #10347
Conversation
…d output channel counts
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed the channel-layout path through MixPort, RenderVoice and Ngs2ProcessReverb. The new input count is used for port mixing and the wet mono fold, while output channel state continues to drive the comb/allpass stages; the dry path is remapped before the output channels are processed. The tests cover unequal counts in both directions, input/output validation, wet output distribution and dry downmix, and the author reports the exact Skyrim setup reaching the menu/loading screen. The open #1384 draft is explicitly distinct: it contains the older experimental reverb and itself records that a rework must preserve main’s reference-checked DSP; this PR does preserve that DSP and adds the missing channel conversion. One useful follow-up would be a focused 2-in/8-out render assertion for the exact title layout. The unverified dry mapping is recorded in technical debt. Hosted eligibility, conventions, intake, labels and report checks pass; product jobs are skipped by path policy. I found no blocking issue in this scope.
|
@hugodearaujo Please remove the existing flags-not-implemented throw expectation in |
|
@MarcZX10 thanks for the review. The 2-in, 8-out case is in now (1762c1d): |
|
@oneandonlydean done in 716498d: |
What
SCE_NGS2_REVERB_VOICE_PARAM_SETUPthrowsNGS2: reverb channel conversion is not implementedwhennum_input_channelsdiffers fromnum_output_channels. The Elder Scrolls V: Skyrim (PPSA03747) sets up its reverb voice with 2 inputs and 8 outputs 19 s into boot, so it stops there.This PR accepts the conversion:
Ngs2Voice::inputChannels; 0 means the output count, for every other voice). Ports into the voice mix in the input layout, through their matrix or the default channel map.max_channels, as the output count already had to be.@JAB-dev, your reverb was checked against the PS4 library's output. If your setup can render a 2-in, 8-out voice, that would settle the dry path. #1384, a draft from before e15f164, also kept a separate input count, on its own reverb.
Tested
main65ac1d3 (with fix(agc): pin the import ceiling only on memory exhaustion #8091, which I run for host imports; it doesn't touch NGS2) stops at 19 s withNGS2: reverb channel conversion is not implemented.main65ac1d3 with this PR (and no fix(agc): pin the import ceiling only on memory exhaustion #8091) sets the voice up with 2 inputs and 8 outputs. It reaches the main menu, and New Game reaches its loading screen. At 155 s it stops on a separate graphics refusal,guest cube texture descriptor holds fewer than 6 array slices (format 71, 512x512x5, ...).ngs2_renderandngs2_core_render, inNgs2Render.cpp:TestReverbConversion: a 2-in, 6-out voice and a 2-in, 8-out voice (the title's layout) give the same front left and right as a 2-in, 2-out voice on the same input, wet and dry. Their centre, surrounds and backs carry the reverb, and their LFE stays silent. With the wet level at 0, a 6-in, 2-out voice givesL + C * sqrt(2)/2 + Ls/2andR + C * sqrt(2)/2 + Rs/2.TestReverbSetup: 1 input and 2 outputs is accepted. Input or output counts of 3 or 7 are rejected with the invalid-argument error, as equal counts of 3, 4, 5 and 7 already were.main'sVoice.cpp, both executables abort withNGS2: reverb channel conversion is not implemented.ngs2_*tests pass. Linux (Arch, kernel 7.2.11), GCC 16.2.1, Release.tools/check_conventions.pypasses.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)