AnyPS5/core/libs/prx/libSceNgs2.native
gookie 132715e4e2 perf(libSceNgs2.native): parse waveform files without reading their samples
sceNgs2ParseWaveformFile read everything from the offset to the end of
the file into a zero-filled buffer and parsed that, although parsing
uses only the RIFF chunk headers and the fmt, fact and smpl payloads.
A waveform at an offset in a sound bank cost a read of the rest of the
bank on each call.

ReadChunks now takes the bytes through an accessor. Waveform data passes
its buffer; a waveform file seeks to and reads the headers and those
payloads alone, with the same checks against the length from the offset
to the end of the file. The format dispatch both use moves to
ParseWaveform.

ngs2_parse adds a bank of two waveforms in one file, the second with a
chunk after its samples, and parses each at its offset.

PPSA21402 (Balatro) parses its five 33 MB music tracks at start: one
call took 8.3 to 26.7 ms and allocated 33 MB, and now takes 0.01 to
0.04 ms with the same result.
2026-10-11 02:29:13 +02:00
..
include feat(libSceNgs2.native): render silent waveform blocks with flag 0x10 2026-10-11 00:37:42 +02:00
src perf(libSceNgs2.native): parse waveform files without reading their samples 2026-10-11 02:29:13 +02:00
tests perf(libSceNgs2.native): parse waveform files without reading their samples 2026-10-11 02:29:13 +02:00
CMakeLists.txt feat(ngs2): implement legacy submixer UserFx callbacks 2026-10-08 13:18:41 +02:00
Ngs2Library.cmake Merge pull request #959 from JAB-dev/feat/ngs2-pan 2026-10-10 18:53:48 +13:00