docs(debt): name when the emulators stamp the last audio output time #13676

Merged
xXPBSXx merged 1 commit from upstream-pr/13676 into main 2026-10-31 18:49:19 +00:00
xXPBSXx commented 2026-10-30 23:32:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-30T23:32:02Z.


What

The sceAudioOutGetLastOutputTime debt entry cited shadPS4 and fpPS4 as its sources without saying that they stamp the time at different moments. It now names both moments (PS4 sources), when AnyPS5 stamps it, and that KytyPS5 (PS5) has no such function:

sceAudioOutGetLastOutputTime (libSceAudioOut) - signature and behaviour taken from the shadPS4 and fpPS4 reimplementations of the PS4 library, not confirmed on a PS5 title: the time is the process time at which sceAudioOutOutput or sceAudioOutOutputs accepted the port's last block, not the time the block reached the device. shadPS4 (PS4) stamps it after its output thread hands the block on and fpPS4 (PS4) after its blocking device write; AnyPS5 once it has queued the block to a host device or paced a port without one, which can be earlier than both; KytyPS5 (PS5) has no such function

Changed: docs/dev/debt/libSceAudioOut.md, one existing entry. No code change.

Method: the implementations were read at the linked commits; only their behaviour is described here, no code was taken over. "No such function" rests on a search of the whole KytyPS5 repository at commit 5e837a9beac82c031868eaad9348d6a48245fb99. AnyPS5's own behaviour was read in AudioOut.cpp: sceAudioOutOutput stamps the time after the block is queued to the host device, or, for a port without a device, after the port has been paced; sceAudioOutOutputs after all blocks are handed over.

Overlap

All 1592 open PRs were checked on 2026-10-30 at 21:38 UTC against main d4de5943f6 for changes to docs/dev/debt/libSceAudioOut.md and AudioOut.cpp, and the conflict check was repeated after rebasing onto e8efeed58a. Six others change one of the two files (#13588, #13223, #12863, #12791, #9154, #5021); none changes this entry or the lines that stamp the time. Only #12765 conflicts with this change (adjacent lines in the same file); #12863, #9154 and #5021 conflict with main with or without it. Checked again on 2026-10-30 at 23:18 UTC against main 0d862cb0f7 (1577 open pull requests): none of the 23 opened since 21:30 UTC changes either file, and #12765 is still the only one that conflicts with this change.

Tested

Documentation only. tools/check_conventions.py --base upstream/main passes; based on main e8efeed58a, and it merges with main 0d862cb0f7 without a conflict (checked 2026-10-30 23:18 UTC). Not built, not run.

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: #12765 (landing order only; adjacent lines)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5092406206 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13676). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-30T23:32:02Z. --- ### What The `sceAudioOutGetLastOutputTime` debt entry cited shadPS4 and fpPS4 as its sources without saying that they stamp the time at different moments. It now names both moments (PS4 sources), when AnyPS5 stamps it, and that KytyPS5 (PS5) has no such function: > [sceAudioOutGetLastOutputTime](../../../core/libs/prx/libSceAudioOut/src/AudioOut.cpp) (libSceAudioOut) - signature and behaviour taken from the [shadPS4](https://github.com/shadps4-emu/shadPS4) and [fpPS4](https://github.com/red-prig/fpPS4) reimplementations of the PS4 library, not confirmed on a PS5 title: the time is the process time at which `sceAudioOutOutput` or `sceAudioOutOutputs` accepted the port's last block, not the time the block reached the device. [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/0614ce324be092791b758d79f93d9f1ca5b10a81/src/core/libraries/audio/audioout.cpp#L183-L187) (PS4) stamps it after its output thread hands the block on and [fpPS4](https://github.com/red-prig/fpPS4/blob/04cefd43e6fddd1ab033e7980cd356d14c964905/src/audio/ps4_libsceaudioout.pas#L695-L804) (PS4) after its blocking device write; AnyPS5 once it has queued the block to a host device or paced a port without one, which can be earlier than both; KytyPS5 (PS5) has no such function Changed: `docs/dev/debt/libSceAudioOut.md`, one existing entry. No code change. Method: the implementations were read at the linked commits; only their behaviour is described here, no code was taken over. "No such function" rests on a search of the whole KytyPS5 repository at commit `5e837a9beac82c031868eaad9348d6a48245fb99`. AnyPS5's own behaviour was read in `AudioOut.cpp`: `sceAudioOutOutput` stamps the time after the block is queued to the host device, or, for a port without a device, after the port has been paced; `sceAudioOutOutputs` after all blocks are handed over. ### Overlap All 1592 open PRs were checked on 2026-10-30 at 21:38 UTC against `main` `d4de5943f6` for changes to `docs/dev/debt/libSceAudioOut.md` and `AudioOut.cpp`, and the conflict check was repeated after rebasing onto `e8efeed58a`. Six others change one of the two files (#13588, #13223, #12863, #12791, #9154, #5021); none changes this entry or the lines that stamp the time. Only #12765 conflicts with this change (adjacent lines in the same file); #12863, #9154 and #5021 conflict with `main` with or without it. Checked again on 2026-10-30 at 23:18 UTC against `main` `0d862cb0f7` (1577 open pull requests): none of the 23 opened since 21:30 UTC changes either file, and #12765 is still the only one that conflicts with this change. ### Tested Documentation only. `tools/check_conventions.py --base upstream/main` passes; based on `main` `e8efeed58a`, and it merges with `main` `0d862cb0f7` without a conflict (checked 2026-10-30 23:18 UTC). Not built, not run. ### 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: #12765 (landing order only; adjacent lines) - [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-30 23:38:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T23:38:21Z.

Review: APPROVED


Reviewed — looks good

The documentation-only clarification is supported by the cited implementations; keep the declared #12765 landing order because a combined branch preview conflicts in the same debt file.

What I ran

Reviewed exact head 4574fd1356b0501a69cbea3b6fa824f0f5731d22 against PR base bb45e1c59633c948c813f00d447ead34ca46a576. Both PR heads merge individually with current main 5324fcd2e88daedb1ccae954cc18c825a212db8d; the pairwise preview of #12765 and #13676 conflicts in docs/dev/debt/libSceAudioOut.md. Environment: Debian Linux 6.1.0-54-amd64, x86-64, Python 3.11.2; no compiler or project build was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13676
python3 tools/pr_stack_check.py 13676 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-stack/boykopovar-AnyPS5-pr-13676-final
git --git-dir=/tmp/anyps5-pair-12765-13676.git merge-tree --write-tree refs/pr/12765 refs/pr/13676
sed -n '175,190p' /tmp/shadps4-audioout.cpp
sed -n '690,810p' /tmp/fpps4-audioout.pas
grep -n -A45 -B15 'sceAudioOutGetLastOutputTime\|sceAudioOutOutput\|sceAudioOutOutputs' /tmp/anyps5-audioout.cpp
grep -R -n 'sceAudioOutGetLastOutputTime' /tmp/KytyPS5-5e837a9beac82c031868eaad9348d6a48245fb99 2>/dev/null | head -20

Results

Check Result
Diff and conventions Passed. Documentation-only change; git diff --check passed and repository conventions reported no findings.
Source verification The pinned shadPS4 implementation stamps after handing audio to its output implementation; fpPS4 stamps after its blocking device write. AnyPS5 stamps after queueing or pacing. A search of the pinned KytyPS5 source tree found no sceAudioOutGetLastOutputTime symbol.
Integration Each PR merges cleanly with current main; combining #12765 then #13676 conflicts in the shared debt file. The PR already declares the dependency and landing order. Reconcile the conflict after #12765 lands; no request to rebase now.
Hosted CI Eligibility, intake, conventions and labels passed. Product build/test jobs were skipped because only documentation changed.
Precheck limitation The aggregate precheck was not clean: its isolated checkout lacks the workspace-only tools/pr_test_quality.py, and it reports the declared dependency head is not yet included. These are tooling/stack status, not a failed documentation check.
Unedited relevant output

Conventions:

All conventions checks passed.

Current-main and dependency preview:

# PR stack check — fresh

Target: https://github.com/boykopovar/AnyPS5/pull/13676
Target branch tip: `5324fcd2e88daedb1ccae954cc18c825a212db8d`
All heads unchanged: **True**
Dependency order: #12765 → #13676

## Individual merge previews

- PR #12765: **clean** against current base; head `37648e7c777634b4829036c2cb4a6e5004f142d8`; changed paths: none reported
- PR #13676: **clean** against current base; head `4574fd1356b0501a69cbea3b6fa824f0f5731d22`; changed paths: none reported

## Dependency relationships

- #12765 → #13676: **current_dependency_head_not_included**; overlapping changed paths: `docs/dev/debt/libSceAudioOut.md`

Pairwise preview:

Auto-merging docs/dev/debt/libSceAudioOut.md
CONFLICT (content): Merge conflict in docs/dev/debt/libSceAudioOut.md

Precheck helper limitation:

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13676-4574fd1356b0/head-4574fd1356b0-b8c03010/tools/pr_test_quality.py': [Errno 2] No such file or directory

Sources

Not verified

No project build, unit test, device playback or PS5 console run was relevant to this documentation-only diff. The cited PS4 emulator behavior is not console measurement; the PR says so explicitly.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5719819486 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13676#pullrequestreview-5719819486). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T23:38:21Z. **Review:** APPROVED --- # Reviewed — looks good The documentation-only clarification is supported by the cited implementations; keep the declared #12765 landing order because a combined branch preview conflicts in the same debt file. ## What I ran Reviewed exact head `4574fd1356b0501a69cbea3b6fa824f0f5731d22` against PR base `bb45e1c59633c948c813f00d447ead34ca46a576`. Both PR heads merge individually with current `main` `5324fcd2e88daedb1ccae954cc18c825a212db8d`; the pairwise preview of #12765 and #13676 conflicts in `docs/dev/debt/libSceAudioOut.md`. Environment: Debian Linux 6.1.0-54-amd64, x86-64, Python 3.11.2; no compiler or project build was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13676 python3 tools/pr_stack_check.py 13676 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-stack/boykopovar-AnyPS5-pr-13676-final git --git-dir=/tmp/anyps5-pair-12765-13676.git merge-tree --write-tree refs/pr/12765 refs/pr/13676 sed -n '175,190p' /tmp/shadps4-audioout.cpp sed -n '690,810p' /tmp/fpps4-audioout.pas grep -n -A45 -B15 'sceAudioOutGetLastOutputTime\|sceAudioOutOutput\|sceAudioOutOutputs' /tmp/anyps5-audioout.cpp grep -R -n 'sceAudioOutGetLastOutputTime' /tmp/KytyPS5-5e837a9beac82c031868eaad9348d6a48245fb99 2>/dev/null | head -20 ``` ## Results | Check | Result | |---|---| | Diff and conventions | Passed. Documentation-only change; `git diff --check` passed and repository conventions reported no findings. | | Source verification | The pinned shadPS4 implementation stamps after handing audio to its output implementation; fpPS4 stamps after its blocking device write. AnyPS5 stamps after queueing or pacing. A search of the pinned KytyPS5 source tree found no `sceAudioOutGetLastOutputTime` symbol. | | Integration | Each PR merges cleanly with current `main`; combining #12765 then #13676 conflicts in the shared debt file. The PR already declares the dependency and landing order. Reconcile the conflict after #12765 lands; no request to rebase now. | | Hosted CI | Eligibility, intake, conventions and labels passed. Product build/test jobs were skipped because only documentation changed. | | Precheck limitation | The aggregate precheck was not clean: its isolated checkout lacks the workspace-only `tools/pr_test_quality.py`, and it reports the declared dependency head is not yet included. These are tooling/stack status, not a failed documentation check. | <details><summary>Unedited relevant output</summary> Conventions: ```text All conventions checks passed. ``` Current-main and dependency preview: ```text # PR stack check — fresh Target: https://github.com/boykopovar/AnyPS5/pull/13676 Target branch tip: `5324fcd2e88daedb1ccae954cc18c825a212db8d` All heads unchanged: **True** Dependency order: #12765 → #13676 ## Individual merge previews - PR #12765: **clean** against current base; head `37648e7c777634b4829036c2cb4a6e5004f142d8`; changed paths: none reported - PR #13676: **clean** against current base; head `4574fd1356b0501a69cbea3b6fa824f0f5731d22`; changed paths: none reported ## Dependency relationships - #12765 → #13676: **current_dependency_head_not_included**; overlapping changed paths: `docs/dev/debt/libSceAudioOut.md` ``` Pairwise preview: ```text Auto-merging docs/dev/debt/libSceAudioOut.md CONFLICT (content): Merge conflict in docs/dev/debt/libSceAudioOut.md ``` Precheck helper limitation: ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13676-4574fd1356b0/head-4574fd1356b0-b8c03010/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` </details> ## Sources - [The revised debt entry at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/4574fd1356b0501a69cbea3b6fa824f0f5731d22/docs/dev/debt/libSceAudioOut.md) - [shadPS4 output timestamp, pinned to commit `0614ce324be092791b758d79f93d9f1ca5b10a81`](https://github.com/shadps4-emu/shadPS4/blob/0614ce324be092791b758d79f93d9f1ca5b10a81/src/core/libraries/audio/audioout.cpp#L183-L187) - [fpPS4 output timestamp, pinned to commit `04cefd43e6fddd1ab033e7980cd356d14c964905`](https://github.com/red-prig/fpPS4/blob/04cefd43e6fddd1ab033e7980cd356d14c964905/src/audio/ps4_libsceaudioout.pas#L695-L804) - [AnyPS5 output timestamp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/4574fd1356b0501a69cbea3b6fa824f0f5731d22/core/libs/prx/libSceAudioOut/src/AudioOut.cpp#L490-L545) - [KytyPS5 audio implementation, pinned to commit `5e837a9beac82c031868eaad9348d6a48245fb99`](https://github.com/KytyPS5/KytyPS5/blob/5e837a9beac82c031868eaad9348d6a48245fb99/src/libs/audio.cpp) ## Not verified No project build, unit test, device playback or PS5 console run was relevant to this documentation-only diff. The cited PS4 emulator behavior is not console measurement; the PR says so explicitly.
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!13676
No description provided.