refactor(audio): drop duplicated stub exports from libSceAudio #241

Merged
adriadam10 merged 1 commit from upstream-pr/241 into main 2026-10-02 07:35:29 +00:00
adriadam10 commented 2026-10-01 17:59:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-01T17:59:00Z.


What

libSceAudio only exported NotImplemented stubs of sceAudioOutInit, Open, Output, SetVolume and Close, which libSceAudioOut already implements (src/AudioOut.cpp). As suggested in review, its Export.cpp now contains only APS5_DUMMY_FUN, like libkernel_sys, so there are no duplicate exports between the libraries and titles bind to the implementation in libSceAudioOut.

No title found that loads libSceAudio without libSceAudioOut.

Tested

Linux (CachyOS, GCC): Release build, ninja libs (NID patching OK) and full ctest pass. nm -D on libSceAudio.prx shows only DummyFunction_nid_no_patch. Windows only through CI. No title tested.

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:4707529749 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/241). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-01T17:59:00Z. --- ### What `libSceAudio` only exported `NotImplemented` stubs of `sceAudioOutInit`, `Open`, `Output`, `SetVolume` and `Close`, which `libSceAudioOut` already implements (`src/AudioOut.cpp`). As suggested in review, its `Export.cpp` now contains only `APS5_DUMMY_FUN`, like `libkernel_sys`, so there are no duplicate exports between the libraries and titles bind to the implementation in `libSceAudioOut`. No title found that loads `libSceAudio` without `libSceAudioOut`. ### Tested Linux (CachyOS, GCC): Release build, `ninja libs` (NID patching OK) and full `ctest` pass. `nm -D` on `libSceAudio.prx` shows only `DummyFunction_nid_no_patch`. Windows only through CI. No title tested. ### 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-01 17:59:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-01T17:59:25Z.


Progress report (c00bc19 → e3fa37f)

📈 System libraries: 78.32% (+0.13%, -5 removed functions)

🗑️ 5 removed
Library Name
libSceAudio sceAudioOutClose
libSceAudio sceAudioOutInit
libSceAudio sceAudioOutOpen
libSceAudio sceAudioOutOutput
libSceAudio sceAudioOutSetVolume
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5937341785 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/241#issuecomment-5937341785). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-01T17:59:25Z. --- <!-- progress-report --> ### Progress report (c00bc19 → e3fa37f) 📈 **System libraries**: 78.32% (+0.13%, -5 removed functions) <details> <summary>🗑️ 5 removed</summary> | Library | Name | | - | - | | libSceAudio | `sceAudioOutClose` | | libSceAudio | `sceAudioOutInit` | | libSceAudio | `sceAudioOutOpen` | | libSceAudio | `sceAudioOutOutput` | | libSceAudio | `sceAudioOutSetVolume` | </details>
adriadam10 commented 2026-10-01 19:17:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-01T19:17:15Z.


Same question as on #228 applies here: no title found that loads libSceAudio without libSceAudioOut, it came from the progress map. If the answer there is to drop the copy, I'll close this one too (or replace it with removing the duplicated stubs, whichever you prefer).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5938768125 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/241#issuecomment-5938768125). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-01T19:17:15Z. --- Same question as on #228 applies here: no title found that loads libSceAudio without libSceAudioOut, it came from the progress map. If the answer there is to drop the copy, I'll close this one too (or replace it with removing the duplicated stubs, whichever you prefer).
boykopovar commented 2026-10-02 07:14:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-10-02T07:14:56Z.


Yes, if no game is found that requires this library's implementation, then duplicate escorts (found in other libraries) should be removed. If this leaves no functions, you can follow the example of libkernel_sys.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5947218419 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/241#issuecomment-5947218419). Originally posted by [boykopovar](https://github.com/boykopovar) on 2026-10-02T07:14:56Z. --- Yes, if no game is found that requires this library's implementation, then duplicate escorts (found in other libraries) should be removed. If this leaves no functions, you can follow the example of libkernel_sys.
boykopovar commented 2026-10-02 07:17:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-10-02T07:17:21Z.


If you have this situation in your other PRs, do the same there.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5947244390 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/241#issuecomment-5947244390). Originally posted by [boykopovar](https://github.com/boykopovar) on 2026-10-02T07:17:21Z. --- If you have this situation in your other PRs, do the same there.
adriadam10 commented 2026-10-02 07:17:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-02T07:17:29Z.


Done: libSceAudio/Export.cpp is now APS5_DUMMY_FUN only, like libkernel_sys; the shared cmake is gone.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5947245836 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/241#issuecomment-5947245836). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-02T07:17:29Z. --- Done: `libSceAudio/Export.cpp` is now `APS5_DUMMY_FUN` only, like `libkernel_sys`; the shared cmake is gone.
adriadam10 commented 2026-10-02 07:25:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-02T07:25:37Z.


If you have this situation in your other PRs, do the same there.

Done, in all of them:

  • #236 (libSceAudiodec): libSceAudiodec.native was built from the same sources. The shared cmake is gone, and its Export.cpp is now APS5_DUMMY_FUN only, because all six of its exports are implemented in libSceAudiodec.
  • #237 (AJM MP3 fix): it was stacked on the old #228. It's now rebased on main without it, and its guest_ajm test is registered in libSceAjm.native and links against it.
  • #247 / #248 (NGS2): libSceNgs2/Export.cpp is now APS5_DUMMY_FUN only. All 25 of its stubs are exported by libSceNgs2.native.

Each PR has a comment with the change. No other open PR of mine exports a function that another library also exports (also checked #227 and #243).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5947346283 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/241#issuecomment-5947346283). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-02T07:25:37Z. --- > If you have this situation in your other PRs, do the same there. Done, in all of them: - #236 (`libSceAudiodec`): `libSceAudiodec.native` was built from the same sources. The shared cmake is gone, and its `Export.cpp` is now `APS5_DUMMY_FUN` only, because all six of its exports are implemented in `libSceAudiodec`. - #237 (AJM MP3 fix): it was stacked on the old #228. It's now rebased on `main` without it, and its `guest_ajm` test is registered in `libSceAjm.native` and links against it. - #247 / #248 (NGS2): `libSceNgs2/Export.cpp` is now `APS5_DUMMY_FUN` only. All 25 of its stubs are exported by `libSceNgs2.native`. Each PR has a comment with the change. No other open PR of mine exports a function that another library also exports (also checked #227 and #243).
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!241
No description provided.