feat(libSceNgs2.native): sampler voice low-pass filter #778
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/778"
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 adriadam10 on 2026-10-05T23:15:37Z.
What
sceNgs2VoiceControlnow accepts the sampler voice filter param (0x1000000a, 56 bytes). Until now it threw "sampler voice param 0x1000000a is not implemented".The only reference with a body is KytyPS5 (
src/libs/ngs2.cpp,Ngs2SamplerFilter). shadPS4, fpPS4, prosper and SharpProspero have nothing for this param, so the layout and behaviour come from KytyPS5 alone:index,location,type, a 64-bitchannel_maskat offset 16 of the payload, thenfrequency,qandlevel.level. It runs after resampling at the system sample rate, not the source rate. A cutoff of 0 gives silence and a cutoff at or above Nyquist passes the input through timeslevel.channel_maskbypasses that channel.Where we differ from KytyPS5 (exact or throw):
runtime_error.q <= 0or a negative level. Here those throwinvalid_argument.max_filtersthrows, as it does in KytyPS5.The inferred layout and the tail behaviour are listed under TechnicalDebt "Unknown function info".
Tested
Linux, GCC (Release and a fast debug build): new
ngs2_filtertest (registered in ctest next tongs2_render/ngs2_atrac9). It renders through a mastering voice into F32 buffers and checks:levelgain at Nyquist, plus the voice going empty once the history drains.On
mainthe test fails because the param throws. 12 mutants of the implementation (source rate, no bypass, no tail, history reset on resend, no clear on setup, level dropped, bounds) each make it fail.ngs2_renderandngs2_atrac9still pass, and so do allguest_*tests.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-05T23:42:20Z.
Rebased on main (TechnicalDebt conflict with the libSceShare line, both kept); ngs2 tests pass.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T03:27:13Z.
Thanks. This now conflicts with
mainindocs/dev/TechnicalDebt.mdonly: #582 (predication GetSize functions) added its line at the same place, the end of the unverified-behaviour list. Keeping both lines resolves it. The code itself is unchanged since my last check, so after the rebase it is ready from my side.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-06T05:16:37Z.
Rebased on current
main: kept both TechnicalDebt lines (#582 predication GetSize and Resource registration, then the sampler filter line).ngs2_*tests pass.