docs(libSceAudioOut): name what the emulators do with the length and frequency of sceAudioOutOpen #13885

Merged
xXPBSXx merged 1 commit from upstream-pr/13885 into main 2026-11-01 23:04:55 +00:00
xXPBSXx commented 2026-10-31 11:07:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-31T11:07:30Z.


What

Adds one entry to the libSceAudioOut technical debt: sceAudioOutOpen rejects only a length of 0 (SCE_AUDIO_OUT_ERROR_INVALID_SIZE) and a frequency of 0 (SCE_AUDIO_OUT_ERROR_INVALID_SAMPLE_FREQ) and accepts every other value, which is not measured on hardware. shadPS4 and fpPS4 (both PS4) return those errors for any length outside 256 to 2048 in steps of 256 and any frequency but 48000, while KytyPS5 (PS5) rejects a frequency of 0, as this library does, and checks no length, where this library rejects 0. The entry does not say which is right and no code or test changes. 44 of the 53 local titles import sceAudioOutOpen.

Tested

Documentation only. tools/check_conventions.py --base upstream/main passes. Based on main 833be4af8d, and it merges with main 602c0e417c without a conflict (checked 2026-10-31 11:00 UTC). I read the three emulators at the commits named in the entry (KytyPS5 5e837a9beac82c031868eaad9348d6a48245fb99, shadPS4 0614ce324be092791b758d79f93d9f1ca5b10a81, fpPS4 04cefd43e6fddd1ab033e7980cd356d14c964905) and our sceAudioOutOpen in AudioOut.cpp. I did not measure which lengths and frequencies the local titles pass.

Overlap

Checked on 2026-10-31 at 08:02 UTC against main a76a5f3a37 (1608 open pull requests). I took the changed files of each of the 1608 open pull requests from git diff --name-only against its merge base. Seven of them change docs/dev/debt/libSceAudioOut.md: #13781, #13694, #13676, #12863, #12791, #12765 and #5021. git merge-tree against that main: this head alone merges cleanly, and so do its pairs with #13781, #13694, #13676, #12791 and #12765. The pairs with #12863 and #5021 conflict, but each of them conflicts with main on its own. #13676 and #12765 are my own pull requests on the same file; they merge cleanly with this one in either order, so none has to go first. Checked once more on 2026-10-31 at 11:00 UTC against main 602c0e417c with this head: the same results for these seven, and of the 82 pull requests opened since 06:30 UTC only #13836 changes these files, and it merges the same with and without this change.

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

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5096955703 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13885). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-31T11:07:30Z. --- ### What Adds one entry to the libSceAudioOut technical debt: `sceAudioOutOpen` rejects only a length of 0 (`SCE_AUDIO_OUT_ERROR_INVALID_SIZE`) and a frequency of 0 (`SCE_AUDIO_OUT_ERROR_INVALID_SAMPLE_FREQ`) and accepts every other value, which is not measured on hardware. shadPS4 and fpPS4 (both PS4) return those errors for any length outside 256 to 2048 in steps of 256 and any frequency but 48000, while KytyPS5 (PS5) rejects a frequency of 0, as this library does, and checks no length, where this library rejects 0. The entry does not say which is right and no code or test changes. 44 of the 53 local titles import `sceAudioOutOpen`. ### Tested Documentation only. `tools/check_conventions.py --base upstream/main` passes. Based on `main` `833be4af8d`, and it merges with `main` `602c0e417c` without a conflict (checked 2026-10-31 11:00 UTC). I read the three emulators at the commits named in the entry (KytyPS5 5e837a9beac82c031868eaad9348d6a48245fb99, shadPS4 0614ce324be092791b758d79f93d9f1ca5b10a81, fpPS4 04cefd43e6fddd1ab033e7980cd356d14c964905) and our `sceAudioOutOpen` in `AudioOut.cpp`. I did not measure which lengths and frequencies the local titles pass. ### Overlap Checked on 2026-10-31 at 08:02 UTC against `main` a76a5f3a37 (1608 open pull requests). I took the changed files of each of the 1608 open pull requests from `git diff --name-only` against its merge base. Seven of them change `docs/dev/debt/libSceAudioOut.md`: #13781, #13694, #13676, #12863, #12791, #12765 and #5021. `git merge-tree` against that `main`: this head alone merges cleanly, and so do its pairs with #13781, #13694, #13676, #12791 and #12765. The pairs with #12863 and #5021 conflict, but each of them conflicts with `main` on its own. #13676 and #12765 are my own pull requests on the same file; they merge cleanly with this one in either order, so none has to go first. Checked once more on 2026-10-31 at 11:00 UTC against `main` `602c0e417c` with this head: the same results for these seven, and of the 82 pull requests opened since 06:30 UTC only #13836 changes these files, and it merges the same with and without this change. ### 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](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 AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-31 11:11:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T11:11:59Z.

Review: APPROVED


Reviewed — looks good

The documentation-only change matches the exact-head implementation and the three pinned emulator revisions; I found no blocking issue.

What I ran

Reviewed head 28bd85cb7a90090757cf1322e9c1700a3bbd608f against base 8f55414024c614b32548254e59e80bd3f0085231; merge preview was clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0; no C/C++ compiler was used.

python3 -m unittest tools.tests.test_check_conventions_doc_links
git diff --check 8f55414024c614b32548254e59e80bd3f0085231...28bd85cb7a90090757cf1322e9c1700a3bbd608f
python3 tools/check_conventions.py --base 8f55414024c614b32548254e59e80bd3f0085231 --head 28bd85cb7a90090757cf1322e9c1700a3bbd608f --title 'docs(libSceAudioOut): name what the emulators do with the length and frequency of sceAudioOutOpen' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13885-28bd85cb7a90/pr-body.md

Results

Check Result
Documentation link tests Passed, 6 tests
git diff --check Passed, no output
Repository conventions and PR template Passed
Hosted eligibility Passed; product build jobs were skipped for this docs-only change
Source comparison The PR’s statement matches the pinned emulator source and AnyPS5 implementation
Unedited local test and convention output
......
----------------------------------------------------------------------
Ran 6 tests in 0.001s

OK
All conventions checks passed.

Sources

Not verified

No C/C++ build or hardware/console behavior was tested. The new note explicitly says AnyPS5’s acceptance of nonzero lengths/frequencies has not been measured on hardware.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722478030 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13885#pullrequestreview-5722478030). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T11:11:59Z. **Review:** APPROVED --- # Reviewed — looks good The documentation-only change matches the exact-head implementation and the three pinned emulator revisions; I found no blocking issue. ## What I ran Reviewed head `28bd85cb7a90090757cf1322e9c1700a3bbd608f` against base `8f55414024c614b32548254e59e80bd3f0085231`; merge preview was clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0; no C/C++ compiler was used. ```sh python3 -m unittest tools.tests.test_check_conventions_doc_links git diff --check 8f55414024c614b32548254e59e80bd3f0085231...28bd85cb7a90090757cf1322e9c1700a3bbd608f python3 tools/check_conventions.py --base 8f55414024c614b32548254e59e80bd3f0085231 --head 28bd85cb7a90090757cf1322e9c1700a3bbd608f --title 'docs(libSceAudioOut): name what the emulators do with the length and frequency of sceAudioOutOpen' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13885-28bd85cb7a90/pr-body.md ``` ## Results | Check | Result | |---|---| | Documentation link tests | Passed, 6 tests | | `git diff --check` | Passed, no output | | Repository conventions and PR template | Passed | | Hosted eligibility | Passed; product build jobs were skipped for this docs-only change | | Source comparison | The PR’s statement matches the pinned emulator source and AnyPS5 implementation | <details><summary>Unedited local test and convention output</summary> ```text ...... ---------------------------------------------------------------------- Ran 6 tests in 0.001s OK All conventions checks passed. ``` </details> ## Sources - [AnyPS5 `sceAudioOutOpen` at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/28bd85cb7a90090757cf1322e9c1700a3bbd608f/core/libs/prx/libSceAudioOut/src/AudioOut.cpp#L441-L472) checks zero length/frequency and does not impose the emulator length/frequency restrictions described in the new debt note. - [shadPS4 at `0614ce324be092791b758d79f93d9f1ca5b10a81`](https://github.com/shadps4-emu/shadPS4/blob/0614ce324be092791b758d79f93d9f1ca5b10a81/src/core/libraries/audio/audioout.cpp#L247-L250) rejects lengths outside 256–2048 in multiples of 256; [its sample-rate check](https://github.com/shadps4-emu/shadPS4/blob/0614ce324be092791b758d79f93d9f1ca5b10a81/src/core/libraries/audio/audioout.cpp#L274-L277) accepts only 48000. - [fpPS4 at `04cefd43e6fddd1ab033e7980cd356d14c964905`](https://github.com/red-prig/fpPS4/blob/04cefd43e6fddd1ab033e7980cd356d14c964905/src/audio/ps4_libsceaudioout.pas#L229-L246) applies the same enumerated lengths and 48000 frequency. - [KytyPS5 at `5e837a9beac82c031868eaad9348d6a48245fb99`](https://github.com/KytyPS5/KytyPS5/blob/5e837a9beac82c031868eaad9348d6a48245fb99/src/libs/audio.cpp#L856-L896) rejects zero frequency and contains no length validation in `AudioOutOpen`. ## Not verified No C/C++ build or hardware/console behavior was tested. The new note explicitly says AnyPS5’s acceptance of nonzero lengths/frequencies has not been measured on hardware.
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!13885
No description provided.