fix(ajm): honor Opus gapless resets #6040
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6040"
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 Ondra97 on 2026-10-14T20:15:38Z.
What
After an Opus segment reaches its gapless sample limit,
sceAjmBatchJobSetGaplessDecodewithreset=1does not restore output onmain: the next valid packet is consumed with result 0, but produces no PCM. For a 500-sample stereo S16 segment, the first segment writes 2000 bytes and the second writes 0 instead of 2000.The gapless reset clears
segmentSamples, whileRunOpuscompares the limit with the lifetimetotalDecodedSamples. Opus now counts and clips against the existing segment counter, as the other AJM decoders do, and keeps the cumulative stream sideband count.Tested
Windows 11 Pro, build 26300, WinLibs MinGW-w64 GCC 15.2.0 UCRT POSIX SEH r7, Release,
BUILD_TESTING=ON, fullbuild-runtimeconfiguration.411e5e6d9, production unchanged: existingguest_ajmpassed. With the new public-API regression, the second segment failed withOpus gapless segment 1 wrote 0 bytes, expected 2000(0.19 s).reset=0, and 2x resampling without clearing the decoder or resampler.f785b88a6. The final audio suite and patched-library audit passed 33/33 in 5.53 s, without skips. Conventions, whitespace and test registration checks passed. The repository overlap checker reports no overlap with open pull requests, on the same current main.911e6c83): it extends multichannel Opus mapping family 255 and does not implement this gapless fix. The adjacent ATRAC9 configuration fix #5658 is also separate. All open-PR file lists were checked, including older and large PRs beyond the first 100 files.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 github-actions[bot] on 2026-10-15T12:13:46Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/tests/GuestAjm.cppcore/libs/prx/libSceAjm.native/src/Ajm.cppcore/libs/prx/libSceAjm.native/src/Ajm.cppcore/libs/tests/GuestAjm.cppImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T21:01:44Z.
The overlap bot flags #6841 at the same
GuestAjm.cppinsertion point. The new test covers codec-23 resampling, while yours covers Opus gapless resets; the behaviors are separate, so the merge should retain both test blocks. #6841 is also behind currentmainand has been asked to rebase and coordinate. Please agree with its author on merge order and preserve both tests during integration.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T21:27:50Z.
Checked
RunOpusnow clips and counts againstsegmentSampleslike the other AJM decoders, keepingtotalDecodedSamplescumulative.guest_ajmpasses and fails without theAjm.cppchange (three gapless resets, 960/128-frame buffers,reset=0control, 2x resampling). The overlap with #6841 is only adjacent test blocks inGuestAjm.cpp; merging.