fix(ajm): a decode job fits the 64-byte batch titles allocate #420
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/420"
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 MichonGoddijn231849 on 2026-10-02T23:21:05Z.
What
libSceAjm.nativestored each batch job as a 72-byte header plus 16 bytes per buffer, so onesceAjmBatchJobDecodetook 104 bytes. GTA V initializes each MP3 batch with a 0x40-byte buffer, so every decode returnedSCE_AJM_ERROR_OUT_OF_RESOURCES. No batch ever started, and the game gave up on its streams and requested them again. Music and character speech were silent, andINTERACTIVE_MUSIC.rpfwas read at about 100 MB/s.A job is now a 32-byte record, followed by its buffers, then its parameters only when it has any. A decode job takes 64 bytes. The set-gapless job now records its parameter size, which it copied without setting before.
sceAjmBatchStartunpacks the record into the sameJobHeaderthatExecutereads, so decoding itself is unchanged.Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0.
ctest: all tests pass.guest_ajmnow decodes its MP3 frames through a 64-byte batch; the old encoding fails it.INTERACTIVE_MUSIC.rpfdropped from about 1 GB per 10 s to a few MB.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🤖 Generated with Claude Code