Skip to content

fix(libSceNgs2.native): report one ATRAC9 frame as the parsed decoder delay - #9143

Merged
3 commits merged into
boykopovar:mainfrom
MarrasFederico:fix/ngs2-atrac9-parsed-delay
Oct 23, 2026
Merged

3 commits merged into
boykopovar:mainfrom
MarrasFederico:fix/ngs2-atrac9-parsed-delay

Conversation

@MarrasFederico

Copy link
Copy Markdown
Contributor

What

sceNgs2ParseWaveformData reported an ATRAC9 file's num_delay_samples from the second word of its fact chunk. prosper's reading of libSceNgs2.native.sprx, which this debt file already relies on elsewhere, sets that delay for ATRAC9 to one codec frame (delay = unit_samples). It reads the fact delay word only for type 0x43 (L244). Its ParseAtrac9 test passes a fact of {900, 0} and expects a delay of 256 ("delay = one frame"). @nikowolf123 pointed this out in #8528.

The parser now reports codec.frameSamples, the same frame length it already writes to num_audio_unit_samples. The field is only reported to the caller; nothing in the library reads it back. The block skip is unchanged and still comes from the third fact word. That is where prosper uses the same one-frame delay, so it is recorded as the remaining difference in a new debt entry, next to the ATRAC9 loop entry.

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_atrac9: the existing ATRAC9 file (fact 900, 256, 256) still parses with a delay of 256. Copies with the fact delay word set to 0, 1, 900 and 0xffffffff all report a delay of 256, the same skip of 256 and 900 samples.
  • The test fails on main, where the delay follows the fact word. All 13 ngs2 tests pass.
  • tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py finds no conflicting lines. It could not compare feat(ngs2): decode complete HE-VAG waveform blocks #5797 (HE-VAG decoding) and fix(libSceNgs2): return the custom rack creation errors #8609, which conflict with main; neither touches the parsed delay.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 5797 core/libs/prx/libSceNgs2.native/src/Atrac9.cpp
docs/dev/debt/libSceNgs2.native.md

@ycbuzi

ycbuzi commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Windows run of 4fb7022 merged onto main 0c6a5bd (aff183fc52, 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.native and ngs2_atrac9_tests with no errors or warnings. ctest --repeat until-fail:2 on ngs2_atrac9: passes on both repeats. Not run: a title.

@oneandonlydean oneandonlydean self-assigned this Oct 22, 2026
@oneandonlydean oneandonlydean closed this pull request by merging all changes into boykopovar:main in 6ee3872 Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants