fix(audio): recognize individual propagation path import #1947

Merged
oguzhanozfe merged 1 commit from upstream-pr/1947 into main 2026-10-10 06:12:22 +00:00
oguzhanozfe commented 2026-10-09 01:39:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oguzhanozfe on 2026-10-09T01:39:27Z.


What

SAROS imports tKSmk2JsMAA from libSceAudioPropagation, but the library only declares the plural sceAudioPropagationSourceSetAudioPaths. Eager import resolution therefore fails before the executable starts.

Declare the distinct singular sceAudioPropagationSourceSetAudioPath(uint64_t path, const void* data, float gain). Its signature follows the pinned public SharpProspero declaration linked in TechnicalDebt. Invocation calls the standard named unsupported-function helper and throws without reading or writing caller memory. Successful path updates remain unsupported; allocation, ownership, rendering and console error codes remain unknown.

Extend guest_audio_propagation with sentinel-memory preservation and null-input refusal checks. Existing zero-path behavior remains unchanged.

Tested

Windows x86-64, WinLibs GCC 15.2.0, Release, current main at f145139676a48306681d3a4d5fabf83938759daf.

  • Canonical full-library CMake configuration with BUILD_TESTING=ON; built nid_patcher, guest_audio_propagation_tests, guest_thread_callback_abi_tests and windows_exception_tests, including their libc, libkernel and audio dependencies.
  • ctest --test-dir build --output-on-failure -R "^(guest_audio_propagation|guest_thread_callback_abi|windows_exceptions)$": 3/3 passed.
  • Private public-data synthetic fixtures through the production relinker and NID patcher: the clean current-main audio provider fails on the missing NID; the candidate binds and invokes the actual setter through its populated GOT, checks the exact named exception, descriptor-shaped sentinel preservation, null refusal and existing zero-path lifecycle behavior; an unrelated unknown NID still fails at startup. Unchanged relinker and old-provider binaries were reused from a hash-verified clean build at the same main revision.
  • python tools/check_conventions.py --base origin/main and git diff --check: passed.

A separate local SAROS trial, with a private resource mount and all 40 guest modules, exited at a later unresolved Acm import before guest initialization or ELF entry. Main-first eager import order supports that the original audio import resolved; the title never invoked this setter. That trial was not a clean run of this public candidate. No title window, rendering or gameplay was observed. Successful audio-path updates, float-register transport and gameplay remain unverified. The full test suite was not rerun.

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); no silent stub added
  • No notes, investigation files, logs or images added to the repository
  • No new third-party code
  • Generic behavior, no title-specific changes
  • Depends on: none
  • AI-assisted: yes (Codex). The submitting author is responsible for every changed line.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4794870980 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1947). Originally posted by [oguzhanozfe](https://github.com/oguzhanozfe) on 2026-10-09T01:39:27Z. --- ### What SAROS imports `tKSmk2JsMAA` from `libSceAudioPropagation`, but the library only declares the plural `sceAudioPropagationSourceSetAudioPaths`. Eager import resolution therefore fails before the executable starts. Declare the distinct singular `sceAudioPropagationSourceSetAudioPath(uint64_t path, const void* data, float gain)`. Its signature follows the pinned public SharpProspero declaration linked in TechnicalDebt. Invocation calls the standard named unsupported-function helper and throws without reading or writing caller memory. Successful path updates remain unsupported; allocation, ownership, rendering and console error codes remain unknown. Extend `guest_audio_propagation` with sentinel-memory preservation and null-input refusal checks. Existing zero-path behavior remains unchanged. ### Tested Windows x86-64, WinLibs GCC 15.2.0, Release, current `main` at `f145139676a48306681d3a4d5fabf83938759daf`. - Canonical full-library CMake configuration with `BUILD_TESTING=ON`; built `nid_patcher`, `guest_audio_propagation_tests`, `guest_thread_callback_abi_tests` and `windows_exception_tests`, including their libc, libkernel and audio dependencies. - `ctest --test-dir build --output-on-failure -R "^(guest_audio_propagation|guest_thread_callback_abi|windows_exceptions)$"`: 3/3 passed. - Private public-data synthetic fixtures through the production relinker and NID patcher: the clean current-main audio provider fails on the missing NID; the candidate binds and invokes the actual setter through its populated GOT, checks the exact named exception, descriptor-shaped sentinel preservation, null refusal and existing zero-path lifecycle behavior; an unrelated unknown NID still fails at startup. Unchanged relinker and old-provider binaries were reused from a hash-verified clean build at the same main revision. - `python tools/check_conventions.py --base origin/main` and `git diff --check`: passed. A separate local SAROS trial, with a private resource mount and all 40 guest modules, exited at a later unresolved Acm import before guest initialization or ELF entry. Main-first eager import order supports that the original audio import resolved; the title never invoked this setter. That trial was not a clean run of this public candidate. No title window, rendering or gameplay was observed. Successful audio-path updates, float-register transport and gameplay remain unverified. The full test suite was not rerun. ### Checklist - [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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); no silent stub added - [x] No notes, investigation files, logs or images added to the repository - [x] No new third-party code - [x] Generic behavior, no title-specific changes - [x] Depends on: none - [x] AI-assisted: yes (Codex). The submitting author is responsible for every changed line.
github-actions[bot] commented 2026-10-09 01:39:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T01:39:52Z.


Progress report (737e209 → 2e01ba2)

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

🆕 1 declared as stubs
Library Name
libSceAudioPropagation sceAudioPropagationSourceSetAudioPath
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6072503510 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1947#issuecomment-6072503510). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T01:39:52Z. --- <!-- progress-report --> ### Progress report (737e209 → 2e01ba2) 📉 **System libraries**: 85.71% (-0.02%, +1 declared functions) <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libSceAudioPropagation | `sceAudioPropagationSourceSetAudioPath` | </details>
MarcZX10 commented 2026-10-09 01:46:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T01:46:26Z.

Review: APPROVED


Reviewed the full diff, the public signature reference, and the regression coverage. The singular setter is declared separately from the plural API, throws through the named unsupported-function path without reading or writing caller memory, and the test checks both sentinel preservation and null refusal. The author reports Windows binding tests through the real relinker/GOT path; upstream Linux and Windows Build, Conventions, and Progress checks are green on this head. The PR clearly records that successful updates and title gameplay remain unverified. No blocking issue found.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5464819157 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1947#pullrequestreview-5464819157). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T01:46:26Z. **Review:** APPROVED --- Reviewed the full diff, the public signature reference, and the regression coverage. The singular setter is declared separately from the plural API, throws through the named unsupported-function path without reading or writing caller memory, and the test checks both sentinel preservation and null refusal. The author reports Windows binding tests through the real relinker/GOT path; upstream Linux and Windows Build, Conventions, and Progress checks are green on this head. The PR clearly records that successful updates and title gameplay remain unverified. No blocking issue found.
Dextroid17 commented 2026-10-09 03:06:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T03:06:33Z.

Review: COMMENTED


Verified on Linux — a compile-level differential, and the "does not touch caller memory" claim is genuinely pinned.

  • Arm A (this PR): guest_audio_propagation_tests builds and passes, exit 0.
  • Arm B (control): AudioPropagation.hpp and Export.cpp back at main with the test kept → the build fails to compile: GuestAudioPropagation.cpp:123: 'sceAudioPropagationSourceSetAudioPath' was not declared. So the test depends on the new declaration, which is precisely what an eager-import fix has to provide.
  • Claim cross-check: the implementation discards all three arguments (static_cast<void>) and then calls NotImplemented_nid_no_patch(__func__), so nothing reads or writes caller memory — and the test turns that into an assertion: it fills a 0xe0 buffer with 0xa5 and checks every byte is still 0xa5 after the throwing call, then repeats with a null pointer. That guarantee is the part a reader cannot see from the diff.
  • Project rule: python3 tools/pr_overlap.py --repo boykopovar/AnyPS5 --branch verify/1947 → "No overlap with open pull requests." So the TechnicalDebt.md edit does not collide with the other open PRs that touch that file.

For the merge bar: the NID (tKSmk2JsMAA) is quoted and matches TechnicalDebt's entry, but the title is only named — the FAIL: unresolved ELF import ... from libSceAudioPropagation.prx line, plus an ID, would put the evidence next to the fix. I have no dump of it to reproduce that here.

Not verified: the title's own start-up failure.

Written with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5465260024 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1947#pullrequestreview-5465260024). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-09T03:06:33Z. **Review:** COMMENTED --- Verified on Linux — a compile-level differential, and the "does not touch caller memory" claim is genuinely pinned. - **Arm A (this PR)**: `guest_audio_propagation_tests` builds and passes, **exit 0**. - **Arm B (control)**: `AudioPropagation.hpp` and `Export.cpp` back at `main` with the test kept → the build **fails to compile**: `GuestAudioPropagation.cpp:123: 'sceAudioPropagationSourceSetAudioPath' was not declared`. So the test depends on the new declaration, which is precisely what an eager-import fix has to provide. - **Claim cross-check**: the implementation discards all three arguments (`static_cast<void>`) and then calls `NotImplemented_nid_no_patch(__func__)`, so nothing reads or writes caller memory — and the test turns that into an assertion: it fills a `0xe0` buffer with `0xa5` and checks every byte is still `0xa5` after the throwing call, then repeats with a null pointer. That guarantee is the part a reader cannot see from the diff. - **Project rule**: `python3 tools/pr_overlap.py --repo boykopovar/AnyPS5 --branch verify/1947` → "No overlap with open pull requests." So the `TechnicalDebt.md` edit does not collide with the other open PRs that touch that file. For the merge bar: the NID (`tKSmk2JsMAA`) is quoted and matches TechnicalDebt's entry, but the title is only named — the `FAIL: unresolved ELF import ... from libSceAudioPropagation.prx` line, plus an ID, would put the evidence next to the fix. I have no dump of it to reproduce that here. Not verified: the title's own start-up failure. Written with AI assistance.
oneandonlydean commented 2026-10-09 09:22:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T09:22:46Z.


Which SAROS ID is this, and what's the unresolved ELF import tKSmk2JsMAA line on main? Please also drop the new test: it only checks that a not-implemented stub throws.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6078127805 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1947#issuecomment-6078127805). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-09T09:22:46Z. --- Which SAROS ID is this, and what's the `unresolved ELF import tKSmk2JsMAA` line on main? Please also drop the new test: it only checks that a not-implemented stub throws.
Dextroid17 commented 2026-10-09 11:21:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T11:21:45Z.


The NID half is answerable, and it resolves to the singular name this PR declares. Running the project's own oracle on the import from the body:

$ python3 tools/nid_names.py --nid tKSmk2JsMAA
NID          STATUS        SUGGESTION
tKSmk2JsMAA  rename-ready  sceAudioPropagationSourceSetAudioPath

rename-ready — the name is known and nothing implements it — which is what the PR asserts. The premise also checks out in the tree: libSceAudioPropagation declares only the plural sceAudioPropagationSourceSetAudioPaths (AudioPropagation.hpp:83, Export.cpp:285), and the singular appears nowhere on main. So an eager import of tKSmk2JsMAA does fail for the stated reason.

The other half — which SAROS title ID — cannot come out of a NID: a NID identifies a function, not a title, so that one belongs to whoever ran it.

Written with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6079861413 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1947#issuecomment-6079861413). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-09T11:21:45Z. --- The NID half is answerable, and it resolves to the *singular* name this PR declares. Running the project's own oracle on the import from the body: ``` $ python3 tools/nid_names.py --nid tKSmk2JsMAA NID STATUS SUGGESTION tKSmk2JsMAA rename-ready sceAudioPropagationSourceSetAudioPath ``` `rename-ready` — the name is known and nothing implements it — which is what the PR asserts. The premise also checks out in the tree: `libSceAudioPropagation` declares only the plural `sceAudioPropagationSourceSetAudioPaths` (`AudioPropagation.hpp:83`, `Export.cpp:285`), and the singular appears nowhere on `main`. So an eager import of `tKSmk2JsMAA` does fail for the stated reason. The other half — *which* SAROS title ID — cannot come out of a NID: a NID identifies a function, not a title, so that one belongs to whoever ran it. Written with AI assistance.
adriadam10 commented 2026-10-10 06:05:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T06:05:22Z.


Rebased on main (only a TechnicalDebt.md adjacency conflict) and, as asked above, dropped the new test lines from GuestAudioPropagation.cpp (they only checked that a not-implemented stub throws). The declaration, throwing export and TechnicalDebt entry are unchanged. Build and guest_audio_propagation pass on the rebased tree; NID tKSmk2JsMAA resolves to the singular name per tools/nid_names.py. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6094482853 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1947#issuecomment-6094482853). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-10T06:05:22Z. --- Rebased on main (only a TechnicalDebt.md adjacency conflict) and, as asked above, dropped the new test lines from `GuestAudioPropagation.cpp` (they only checked that a not-implemented stub throws). The declaration, throwing export and TechnicalDebt entry are unchanged. Build and `guest_audio_propagation` pass on the rebased tree; NID `tKSmk2JsMAA` resolves to the singular name per `tools/nid_names.py`. Merging once CI is green.
github-actions[bot] commented 2026-10-10 06:07:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T06:07:57Z.


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
#1934 docs/dev/TechnicalDebt.md L45
#2092 docs/dev/TechnicalDebt.md L45
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6094502444 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1947#issuecomment-6094502444). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T06:07:57Z. --- <!-- 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 | |---|---|---|---| | #1934 | `docs/dev/TechnicalDebt.md` [L45](https://github.com/boykopovar/AnyPS5/blob/56bfc4d1c90fb1787f16cf39b5bcdfeb21455037/docs/dev/TechnicalDebt.md#L45) | | | | #2092 | `docs/dev/TechnicalDebt.md` [L45](https://github.com/boykopovar/AnyPS5/blob/56bfc4d1c90fb1787f16cf39b5bcdfeb21455037/docs/dev/TechnicalDebt.md#L45) | | |
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!1947
No description provided.