Skip to content

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

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
xXPBSXx:docs/audioout-lastoutputtime-sources
Oct 31, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
xXPBSXx:docs/audioout-lastoutputtime-sources

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

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: docs(debt): name what the emulators do for two AudioOut entries #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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

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
PR 13781 docs/dev/debt/libSceAudioOut.md L81-82

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 docs/dev/debt/libSceAudioOut.md
PR 12863 docs/dev/debt/libSceAudioOut.md

@github-actions github-actions Bot added the docs label Oct 31, 2026
@adriadam10 adriadam10 self-assigned this Oct 31, 2026
@adriadam10
adriadam10 merged commit 1cac0ca into boykopovar:main Oct 31, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the entry against AudioOut.cpp (stamp after queueing/pacing in sceAudioOutOutput, after all blocks in sceAudioOutOutputs); docs only, conventions green; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants