feat(ngs2): report the frame info of every supported PCM type #12302

Merged
edubox merged 1 commit from upstream-pr/12302 into main 2026-10-30 05:41:19 +00:00
edubox commented 2026-10-28 08:30:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by edubox on 2026-10-28T08:30:08Z.


What

sceNgs2GetWaveformFrameInfo only answered PCM_I16L; every other PCM type threw, even though the parser and the renderer already accept U8, I24L, I32L, F32L and F64L. It now derives the frame size from Ngs2PcmSampleBytes, so every little-endian PCM type the parser supports answers channels * sample bytes, one sample per frame, one unit and no delay. I16B and VAG still throw.

Tested

Linux (CachyOS), GCC 16.2.1, Release. ngs2_parse_tests covers all six PCM types across 1-8 channels and four sample rates, and keeps I16B, F32B and the unknown ids in the list of types that must throw. ngs2_atrac9_tests passes. Not tested with a title: PPSA02195 requested F32L frame info during startup on a tree with other local changes.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5047496216 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12302). Originally posted by [edubox](https://github.com/edubox) on 2026-10-28T08:30:08Z. --- ### What `sceNgs2GetWaveformFrameInfo` only answered `PCM_I16L`; every other PCM type threw, even though the parser and the renderer already accept U8, I24L, I32L, F32L and F64L. It now derives the frame size from `Ngs2PcmSampleBytes`, so every little-endian PCM type the parser supports answers channels * sample bytes, one sample per frame, one unit and no delay. `I16B` and VAG still throw. ### Tested Linux (CachyOS), GCC 16.2.1, Release. `ngs2_parse_tests` covers all six PCM types across 1-8 channels and four sample rates, and keeps `I16B`, `F32B` and the unknown ids in the list of types that must throw. `ngs2_atrac9_tests` passes. Not tested with a title: PPSA02195 requested F32L frame info during startup on a tree with other local changes. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-28 08:43:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T08:43:08Z.

Review: APPROVED


Reviewed the frame-size path against Ngs2PcmSampleBytes: it has explicit byte widths for the six PCM formats this change enables and throws for the remaining types, so the new branch stays limited to supported formats. The expanded tests check all six formats across 1–8 channels and several sample rates, verify all four output fields, and preserve the unsupported-format cases. The current hosted Windows job and conventions/eligibility checks pass; Linux is skipped by the PR workflow, and the author reports the focused Linux tests. I found no blocking issue in this diff.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5679909075 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12302#pullrequestreview-5679909075). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T08:43:08Z. **Review:** APPROVED --- Reviewed the frame-size path against `Ngs2PcmSampleBytes`: it has explicit byte widths for the six PCM formats this change enables and throws for the remaining types, so the new branch stays limited to supported formats. The expanded tests check all six formats across 1–8 channels and several sample rates, verify all four output fields, and preserve the unsupported-format cases. The current hosted Windows job and conventions/eligibility checks pass; Linux is skipped by the PR workflow, and the author reports the focused Linux tests. I found no blocking issue in this diff.
MarcZX10 commented 2026-10-28 09:14:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T09:14:49Z.

Review: CHANGES_REQUESTED


The current rebased head still has a contribution-checklist blocker: it claims Unblocks: PPSA02195 while stating that no Game bring-up discussion exists. The repository checklist requires the title ID and discussion, or none. Please add the discussion link or change the line to Unblocks: none. The code review on the earlier head does not resolve this current-head checklist issue; I have not re-approved the rebased revision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5680255412 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12302#pullrequestreview-5680255412). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T09:14:49Z. **Review:** CHANGES_REQUESTED --- The current rebased head still has a contribution-checklist blocker: it claims `Unblocks: PPSA02195` while stating that no Game bring-up discussion exists. The repository checklist requires the title ID and discussion, or `none`. Please add the discussion link or change the line to `Unblocks: none`. The code review on the earlier head does not resolve this current-head checklist issue; I have not re-approved the rebased revision.
MarcZX10 commented 2026-10-29 09:26:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T09:26:49Z.

Review: CHANGES_REQUESTED


Re-review — changes requested for current-main integration

The author has fixed the checklist issue: the current description now says Unblocks: none. The exact head 8f53a5351e retains the previously reviewed PCM frame-info implementation, and the author reports the ngs2_* selections passing 21/21 in libSceNgs2.native and 9/9 in libSceNgs2, including parse and ATRAC9 tests; conventions also pass. I did not rerun these tests locally.

The PR is still based on main 4c7d275bef; current upstream main is aaccd0ba39b7. Please refresh onto current main, rerun the focused NGS2 tests and overlap/convention checks on the exact head, then I can re-evaluate merge readiness. I found no new behavior defect in the reported update; this request is for current-main integration.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5695466108 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12302#pullrequestreview-5695466108). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T09:26:49Z. **Review:** CHANGES_REQUESTED --- # Re-review — changes requested for current-main integration The author has fixed the checklist issue: the current description now says `Unblocks: none`. The exact head `8f53a5351e` retains the previously reviewed PCM frame-info implementation, and the author reports the `ngs2_*` selections passing 21/21 in `libSceNgs2.native` and 9/9 in `libSceNgs2`, including parse and ATRAC9 tests; conventions also pass. I did not rerun these tests locally. The PR is still based on main `4c7d275bef`; current upstream main is `aaccd0ba39b7`. Please refresh onto current main, rerun the focused NGS2 tests and overlap/convention checks on the exact head, then I can re-evaluate merge readiness. I found no new behavior defect in the reported update; this request is for current-main integration.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!12302
No description provided.