feat(audioout): implement sceAudioOut2Set3DLatency and accept sceAudioOut2MasteringInit(0) #649

Merged
Celegans12 merged 1 commit from upstream-pr/649 into main 2026-10-05 19:09:18 +00:00
Celegans12 commented 2026-10-05 10:55:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-05T10:55:27Z.


What

libSceAudioOut does not export sceAudioOut2Set3DLatency (TViD1EZXkNI), so PPSA26344's import of it does not resolve, and sceAudioOut2MasteringInit (XHl38ZNknbs) throws for every value.

  • sceAudioOut2Set3DLatency(int userId, uint32_t latency) returns 0 for the system user (0xFF) with latency 2. Any other user or latency throws: no source confirms the unit, the range or the error codes.
  • sceAudioOut2MasteringInit(uint32_t flags) returns 0 for flags 0 and throws for other flags.
  • Signature: KytyPS5 reads (user_id, output, latency_us), marked as unsure there. The title's call leaves edx unset, so two arguments are kept, the second being the latency.
  • Call sites in PPSA26344 v1.008:
    • sceAudioOut2Set3DLatency(0xFF, 2) at 0x2d467c, right after sceAudioOut2Initialize; a negative return takes the audio initialization's failure path (0x2d4814).
    • sceAudioOut2MasteringInit(0) at 0x13221b8 in the audio subsystem setup; the result is ignored.
  • Neither call changes the output: there is no 3D rendering or mastering stage. TechnicalDebt lists this under "Functional", and the assumed signatures under "Unknown function info". The other mastering functions still throw.

Tested

  • Windows 11, MinGW-w64 GCC 15.2.0, based on main 53dc19cf: configure -DBUILD_TESTING=ON, full build, --target libs, ctest:
  • 285/285 tests pass (ctest --output-on-failure)
  • New audio_out2_latency: (0xFF, 2) returns 0 on two calls; (0xFF, 1), (0xFF, 3) and (0x10000000, 2) throw; sceAudioOut2MasteringInit(0) returns 0 and (1) throws. It does not link on main.
  • PPSA26344 v1.008: TViD1EZXkNI, unresolved on main, now resolves; no trace yet shows the title reaching either call.
  • Not tested: Linux (CI), console behaviour.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4743825859 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/649). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-05T10:55:27Z. --- ### What libSceAudioOut does not export `sceAudioOut2Set3DLatency` (`TViD1EZXkNI`), so PPSA26344's import of it does not resolve, and `sceAudioOut2MasteringInit` (`XHl38ZNknbs`) throws for every value. - `sceAudioOut2Set3DLatency(int userId, uint32_t latency)` returns 0 for the system user (0xFF) with latency 2. Any other user or latency throws: no source confirms the unit, the range or the error codes. - `sceAudioOut2MasteringInit(uint32_t flags)` returns 0 for flags 0 and throws for other flags. - Signature: KytyPS5 reads `(user_id, output, latency_us)`, marked as unsure there. The title's call leaves edx unset, so two arguments are kept, the second being the latency. - Call sites in PPSA26344 v1.008: - `sceAudioOut2Set3DLatency(0xFF, 2)` at 0x2d467c, right after `sceAudioOut2Initialize`; a negative return takes the audio initialization's failure path (0x2d4814). - `sceAudioOut2MasteringInit(0)` at 0x13221b8 in the audio subsystem setup; the result is ignored. - Neither call changes the output: there is no 3D rendering or mastering stage. TechnicalDebt lists this under "Functional", and the assumed signatures under "Unknown function info". The other mastering functions still throw. ### Tested - Windows 11, MinGW-w64 GCC 15.2.0, based on `main` 53dc19cf: configure `-DBUILD_TESTING=ON`, full build, `--target libs`, `ctest`: - 285/285 tests pass (`ctest --output-on-failure`) - New `audio_out2_latency`: `(0xFF, 2)` returns 0 on two calls; `(0xFF, 1)`, `(0xFF, 3)` and `(0x10000000, 2)` throw; `sceAudioOut2MasteringInit(0)` returns 0 and `(1)` throws. It does not link on `main`. - PPSA26344 v1.008: `TViD1EZXkNI`, unresolved on `main`, now resolves; no trace yet shows the title reaching either call. - Not tested: Linux (CI), console behaviour. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes
github-actions[bot] commented 2026-10-05 16:06:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T16:06:59Z.


Progress report (e248f40 → 0404752)

📉 System libraries: 79.18% (-0.02%, +1 declared functions)

🆕 1 declared as stubs
Library Name
libSceAudioOut sceAudioOut2Set3DLatency
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5998279755 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/649#issuecomment-5998279755). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-05T16:06:59Z. --- <!-- progress-report --> ### Progress report (e248f40 → 0404752) 📉 **System libraries**: 79.18% (-0.02%, +1 declared functions) <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libSceAudioOut | `sceAudioOut2Set3DLatency` | </details>
github-actions[bot] commented 2026-10-05 18:47:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T18:47:11Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#738 docs/dev/TechnicalDebt.md L116
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6000899081 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/649#issuecomment-6000899081). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-05T18:47:11Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #738 | `docs/dev/TechnicalDebt.md` [L116](https://github.com/boykopovar/AnyPS5/blob/d99194f6e98e20241c407bc2fa3d12e9f531ca6d/docs/dev/TechnicalDebt.md#L116) | | |
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!649
No description provided.