feat(libSceNgs2.native): parse 8-, 24- and 32-bit PCM and float waveforms #9148
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9148"
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 MarrasFederico on 2026-10-21T13:32:43Z.
What
sceNgs2ParseWaveformDataread only 16-bit PCM and ATRAC9: other PCM depths returnedINVALID_WAVEFORM_FORMAT, and float or extensible-PCM files threw. prosper's reading oflibSceNgs2.native.sprxgives the module's routes:WAVE_FORMAT_EXTENSIBLEwith the PCM GUID. 8, 16, 24 and 32 bits become types 0x11, 0x12, 0x14 and 0x16.UNKNOWN_WAVEFORM_FORMAT).These are the PCM and float type numbers #8338 already maps in
sceNgs2CalcWaveformBlock.The 16-bit parser now serves all of these. It reports the frame size as channels × bytes per sample, with one sample and one unit per frame as for 16 bits. It keeps every check of the 16-bit path, which prosper's reading does not apply: channels 1 to 8, a rate of 1 to 192000, the block align, whole frames within the file, and a throw for a looped
smplchunk. Voices still play only 16-bit PCM and ATRAC9, so this changes what the parser reports, not what plays. A new debt entry records both points.Tested
Ubuntu 26.04.1, kernel 7.0.0-38, GCC 15.2.0, Release, full build with
BUILD_TESTING=ON. Windows was not compiled. No title was run.ngs2_parse:WAVE_FORMAT_EXTENSIBLEPCM. Each reports its type, data offset and size, sample count, frame layout and single block.UNKNOWN_WAVEFORM_FORMAT.main. Mapping 24 bits to another type, or returningINVALID_WAVEFORM_FORMATfor an unknown depth, makes it fail. All 13ngs2tests pass.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pyfinds no conflicting lines. It could not compare #5797 (HE-VAG, which changes howsceNgs2ParseWaveformFilecalls the parser, not the PCM path) and #8609, which conflict withmain.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 ycbuzi on 2026-10-21T20:49:10Z.
Windows run of
428cd4e3eemerged ontomain0c6a5bd593(f52100f4db, clean), the platform the description lists as not tested. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release,BUILD_TESTING=ON.Built
libSceNgs2.nativeandngs2_parse_testswith no errors or warnings.ctest --repeat until-fail:2onngs2_parse: passes on both repeats. Not run: a title.