Commit Graph

20 Commits

Author SHA1 Message Date
Jnbla6 ef52b16920 feat(libSceNgs2.native): add custom voice filter support and related tests for 0x13 issue case 2026-10-14 08:39:32 +13:00
Jnbla6 855823e85e feat(libSceNgs2.native): implement custom sampler rack id 0x4001 (#4334) 2026-10-14 08:39:32 +13:00
Del'aRun cac398cb96 feat(libSceNgs2): implement the Geom reset functions
Implement sceNgs2GeomResetListenerParam and sceNgs2GeomResetSourceParam,
taken from #1021 and limited to the two reset functions. The Geom
structures get their real layouts. sceNgs2GeomCalcListener and
sceNgs2GeomApply stay unimplemented.

Co-Authored-By: Dextroid17 <217507631+Dextroid17@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:39:27 +04:00
Simon 233590462c fix(libSceNgs2): report EMPTY for a streaming sampler that played its queue
A playing sampler voice whose waveform still accepts blocks (CONTINUE)
reported only INUSE|PLAYING after it had played every queued block, so
a title that waits for EMPTY before it reuses the voice never did.
PPSA18391 (engine: Clickteam Fusion) reads state_flags & 0x22 != 2 from
sceNgs2VoiceGetState as the end of a sound; each of its sound effects
played once and never again.

The voice now also reports EMPTY (0x20) in that state and keeps
playing, so blocks added later still play. A waveform that was closed
without CONTINUE does not report it.
2026-10-12 00:26:12 +02:00
PhialsBasement 2d9b6aebb7 feat(libSceNgs2.native): render silent waveform blocks with flag 0x10
A waveform block that declares samples with no data threw as not
fitting them. PPSA04867 adds such a block with flags 0x11 (data_size 0,
num_samples 16385) and terminates the process on the throw, followed by
a fully specified block under the same flags, which takes the ordinary
path. Accept flag 0x10, named SILENCE here: a dataless block under it
renders num_samples frames of silence and finishes like a complete
block, reporting its bytes through decoded_data_size. A dataless block
without the flag keeps throwing. No public reference names the flag;
the assumption is recorded in TechnicalDebt.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-11 00:37:42 +02:00
Dean 903863c974
Merge pull request #959 from JAB-dev/feat/ngs2-pan
feat(libSceNgs2.native): implement sceNgs2PanInit and sceNgs2PanGetVolumeMatrix
2026-10-10 18:53:48 +13:00
JAB-dev 00e13ecfa7 feat(libSceNgs2.native): implement sceNgs2PanInit and sceNgs2PanGetVolumeMatrix
Pan follows the PS4 firmware 11.00 libSceNgs2.sprx: the speaker layout
from the init angles, then each param's angle and distance into a
volume matrix for the voice. Every param is checked before anything is
written, and angles too large to wrap throw. The pan functions are
exported from the existing Voice.cpp export block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:26:24 +02:00
JAB-dev 1986905adb Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/ngs2-reverb-rack 2026-10-08 19:38:46 +02:00
TibixDev 0d4db860a6 feat(ngs2): implement legacy submixer UserFx callbacks
Invoke the title callback on planar mixed samples and silence. Preserve per-voice callback data, reset registration on setup, and release the render guard on callback failure. Include behavioral tests and source references. Written with AI assistance.
2026-10-08 13:18:41 +02:00
Gjon Gojcevic 88e77da57b feat(libSceNgs2.native): stream 16-bit PCM waveforms through appended waveform blocks
A 16-bit PCM block whose num_samples exceed its data starts a stream, and waveform blocks with flag 0x2 append more data to it. The voice outputs silence while it has played all appended data and CONTINUE is set, and ends at num_samples or when CONTINUE is cleared.
2026-10-08 07:35:59 +02:00
JAB-dev e493328eb7 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/ngs2-reverb-rack 2026-10-07 07:01:30 +02:00
JAB e289b56e6f
feat(libSceNgs2.native): implement sceNgs2RackGetInfo, sceNgs2VoiceGetPortInfo and sceNgs2VoiceQueryInfo (#958)
RackGetInfo reports the rack's handles, buffer, id, uid, option limits,
render count and active voices. VoiceGetPortInfo reports a port's matrix,
volume and destination. VoiceQueryInfo answers info id 0x4001 with the
voice channel count and throws for other ids. Assumptions are recorded in
TechnicalDebt.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:10:30 +13:00
Dean 5fc8755f4c
Merge pull request #961 from JAB-dev/feat/ngs2-mastering-gain
feat(libSceNgs2.native): mastering voice gain parameter
2026-10-07 10:22:26 +13:00
JAB-dev 34bdc37b76 feat(libSceNgs2.native): reverb rack with I3DL2 parameters
Rack 0x2001 is created with its option layout and KytyPS5's defaults, takes
the setup (0x20010000) and I3DL2 (0x20010001) voice params and reports the
common voice state. The voice mixes its inputs and runs a Freeverb-style
approximation driven by the I3DL2 parameters: room and room HF, early
reflections and their delay, late reverb and its pre-delay, decay time and
HF ratio, and diffusion. Out-of-range params throw, param changes keep the
tail, a stop or kill clears it, and the tail ends once it decays below
1e-20. The console's algorithm is unknown; the approximation is recorded in
TechnicalDebt. The test context buffer pool grows to 64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:21:28 +02:00
JAB-dev 81a332c148 feat(libSceNgs2.native): mastering voice gain parameter
Mastering voice param 0x30000004 sets a full-band and an LFE level. They
scale the mastering voice when it is mixed into the render buffer, the LFE
level on channel 3 of 6- and 8-channel voices. Non-finite levels are
invalid arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:21:28 +02:00
Adrià Franch 5784515e13 fix(libs): use the referenced NGS2 handle and session signaling argument error codes
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 14:39:02 +02:00
Adrià Franch 52869f0112 feat(ngs2): custom submixer rack with UserFx2 modules
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:40:12 +02:00
Adrià Franch 819c045327 feat(libSceNgs2.native): sampler voice low-pass filter
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:16:25 +02:00
Adrià Franch 69bd750c46 feat(libSceNgs2.native): decode ATRAC9 sampler voices, parse and size ATRAC9 waveforms
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-02 09:24:46 +02:00
Adrià Franch 90295d3733 feat(libSceNgs2.native): implement system, racks, voices and PCM rendering
libSceNgs2 keeps its stubs; its types now come from the .native header.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-02 09:24:46 +02:00