feat(ngs2): parse forward ATRAC9 waveform loops #1301
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1301"
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 TibixDev on 2026-10-07T22:45:46Z.
What
Parse one forward ATRAC9 loop from a RIFF
smplchunk. Split the waveform into intro, loop, and tail blocks with decoder history and encoder delay preserved. Read sampler chunks after the audio data, and reject malformed or unsupported loops.Tested
Fedora 44, Release: all six NGS2 tests pass. Loop tests compare rendered samples with LibAtrac9 decoding. They cover finite repeats, loop exit, trailing sampler chunks, truncated chunks, and invalid ranges. Sources and unverified console behavior are recorded in
TechnicalDebt.md.Checklist
main; no duplicate open PR.Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-08T07:01:02Z.
Rebased on
bc1fbe81. Kept the upstream PCM stream tests. The ATRAC9 loop implementation is unchanged.Fedora 44 Release:
ngs2_core_render_tests,ngs2_render_tests,ngs2_atrac9_tests,ngs2_filter_tests,ngs2_custom_tests,ngs2_parse_tests,ngs2_stream_testsbuild; the targeted tests and contribution checks pass. Windows CI is pending.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T10:53:09Z.
Checked build and full ctest (440/440),
ngs2_atrac9fails without the change and passes with it; the loop tests compare against LibAtrac9, not the PR's own output. Thesmpllayout and the inclusive end / encoder-delay subtraction match vgmstreamriff.cat the cited commit. Linux, Windows and conventions are green; merging.Two notes, not blocking:
ReadChunksnow also rejects a chunk (includingdata) larger than the declared RIFF size, wheremainaccepted it truncated. Fine, but it isn't mentioned in the description orTechnicalDebt.md.TechnicalDebt.md(adjacent lines), and its "num_repeats == 0means streamed block" check also matches the intro/tail blocks created here. Please re-check that after rebasing #1300.