feat(libSceNgs2.native): decode ATRAC9 sampler voices, parse and size ATRAC9 waveforms #248
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/248"
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-01T18:59:09Z.
What
Second NGS2 pull request, on top of #247 (its two commits are included until it merges; only the last commit is new here).
waveform_type 0x40,config_dataas the 4 big-endian config bytes) through LibAtrac9, already in the tree for AJM. Superframes are decoded whole: frames inside a superframe have variable size, only the superframe size is fixed. The decoder state carries across consecutive blocks (split streams) and restarts on a block repeat or a reset of the waveform blocks.num_skip_samples,num_samples, repeats, callbacks and the sampler state (decoded_data_size,waveform_data) work as for PCM.sceNgs2ParseWaveformData: RIFF/WAVE with aWAVE_FORMAT_EXTENSIBLEATRAC9fmt(GUID, config at +0x2C),fact(samples, delay, skip) anddata. Other format tags and files withsmplloops throw: how NGS2 splits a looped file into blocks is not known.sceNgs2CalcWaveformBlockfor ATRAC9: superframe-aligned offset and size, skip within the superframe. Other waveform types throw.INVALID_WAVEFORM_DATA 0x804A8430,INVALID_WAVEFORM_FORMAT 0x804A8431,UNKNOWN_WAVEFORM_FORMAT 0x804A8432. AT9 chunk layout cross-checked with vgmstreamriff.c..prxexports with--exclude-libson Linux, as AJM gets through ffmpeg.The test helpers move to
tests/Ngs2Test.hpp, shared byngs2_renderand the newngs2_atrac9.Pan and geometry (
sceNgs2Pan*,sceNgs2Geom*) stay unimplemented: KytyPS5 returns identity matrices, shadPS4 and prosper only log, so there is no reference for the real panning law.Tested
Linux (GCC, Release).
ngs2_atrac9renders a real ATRAC9 superframe (mono, 48 kHz) and compares every sample with LibAtrac9 decoding the same data directly: skip + block end, repeat + state; parses a built AT9 file (fields and error codes); checksCalcWaveformBlockmath and errors. Fullctest: 94/94 pass. NID patching of both.prxsucceeds; exports are onlysceNgs2*. No title tested.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); no silent stubs.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-01T18:59:31Z.
Progress report (
c00bc19→69bd750)📈 System libraries: 79.57% (+1.38%, +24 implemented, -25 removed functions)
✅ 24 implemented
AllocateOnBlockReleasesceNgs2CalcWaveformBlocksceNgs2ParseWaveformDatasceNgs2RackCreatesceNgs2RackCreateWithAllocatorsceNgs2RackDestroysceNgs2RackGetVoiceHandlesceNgs2RackLocksceNgs2RackQueryBufferSizesceNgs2RackUnlocksceNgs2SystemCreatesceNgs2SystemCreateWithAllocatorsceNgs2SystemDestroysceNgs2SystemGetInfosceNgs2SystemQueryBufferSizesceNgs2SystemRendersceNgs2SystemResetOptionsceNgs2SystemSetGrainSamplessceNgs2VoiceControlsceNgs2VoiceGetStatesceNgs2VoiceGetStateFlagssceNgs2VoiceRunCommands🗑️ 25 removed
sceNgs2CalcWaveformBlocksceNgs2GeomApplysceNgs2GeomCalcListenersceNgs2GeomResetListenerParamsceNgs2GeomResetSourceParamsceNgs2PanGetVolumeMatrixsceNgs2PanInitsceNgs2ParseWaveformDatasceNgs2RackCreatesceNgs2RackCreateWithAllocatorsceNgs2RackDestroysceNgs2RackGetVoiceHandlesceNgs2RackLocksceNgs2RackQueryBufferSizesceNgs2RackUnlocksceNgs2SystemCreatesceNgs2SystemCreateWithAllocatorsceNgs2SystemDestroysceNgs2SystemGetInfosceNgs2SystemQueryBufferSizesceNgs2SystemRendersceNgs2SystemSetGrainSamplessceNgs2VoiceControlsceNgs2VoiceGetStatesceNgs2VoiceGetStateFlagsImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-02T07:25:20Z.
Rebased on the updated #247, where
libSceNgs2/Export.cppis nowAPS5_DUMMY_FUNonly (review on #228/#241). Nothing in this PR's own commit changed.