fix(libSceAudioOut): play the PCM a port was given at the set when an AudioOut2 context advances #13998
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13998"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-31T14:57:01Z.
What
With an SDL device,
sceAudioOut2ContextAdvanceread each port's buffer when it completed the grain. A grain given by asceAudioOut2PortSetAttributesset now plays the copy of the buffer taken at that set (the copy #8098 already makes for buffers shared between ports). A port pointed once and rewritten in place still has its buffer read at Advance, soaudio_out2_timingand the PPSA26358 case are unchanged. Contexts without Advance are unchanged.Crash Bandicoot 4 (PPSA02433) has no sound in the menus or in game. Its Wwise 3D sink (
sceaudio3d.prx) hands Wwise's 16 mix buffers to object ports (type 0x100), and Wwise clears them for the next frame before Advance. gdb with a write watchpoint on port 4's buffer, one frame:So every grain was snapshotted as silence (mixed data peak 0.0000 with 16 ports per grain); with the change the same scene mixes peaks of 0.2-0.9.
Tested
TestAdvanceKeepsTheGrainSetBeforeTheBufferIsClearedinaudio_out2_port_buffersfails without the change and passes with it.audio_out*tests pass.tools/check_conventions.py --base upstream/mainpasses.AudioOut2PortBuffers.cpp. #13988 goes first; this PR will be rebased onmainafter it lands and theaudio_out*tests rerun.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T15:02:46Z.
Review: APPROVED
Reviewed — looks good
The exact-head change snapshots each queued PCM grain at
PortSetAttributes, and the Windows CI job built and ran the focused buffer test.What I ran
Reviewed head
c34ab0258d0647effd5033cee7ca06e489d931c5against base73f4f7e06e4f210a8c6570e335fd654dc0a86134; its current-base merge preview is clean. Environment for local checks: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build locally.Results
audio_out2_port_buffers_tests.audio_out*tests passing, and a negative control where the new test fails without the change; I did not reproduce these runs.Unedited Windows job output
Findings
Blocking
None found in the reviewed change.
Non-blocking
PR #13988 also changes the AudioOut2 buffer tests. A pairwise merge preview of the two current heads reports a content conflict in
AudioOut2PortBuffers.cpp; this does not affect #13998's clean merge with currentmain, and the PR description already notes that the second PR to land will need conflict resolution.Sources
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T15:34:16Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The PR’s own description identifies a merge conflict with #13988, but the checklist says
Depends on: none; repository policy requires agreeing on and declaring the landing order.What I ran
Reviewed head
c34ab0258d0647effd5033cee7ca06e489d931c5against base73f4f7e06e4f210a8c6570e335fd654dc0a86134. The individual preview against currentmain474030e58424fefdb65e5df9f3820810fbb4553cwas clean. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5; no local build or tests.Results
mainAudioOut2PortBuffers.cppUnedited check output
Diff check exited 0 with no output.
Conventions:
Individual merge preview:
Pairwise merge preview with #13988:
Hosted check runs:
The precheck could not find its audit helpers in the isolated snapshot:
Findings
Blocking
Landing order for #13988 is unresolved. The two open heads have a real content conflict in the same test file, and this PR's body states that whichever lands second needs a rebase while declaring no dependency. Choose which PR lands first and declare that order with the appropriate
Depends onentry on the later PR. Rebase the later PR after the first lands and rerun its tests.Sources
Depends onNot verified
I did not build or run tests locally. The Linux test and title-audio results are author-reported; the hosted Windows job passed its changed guest-test build/run step. I did not measure behavior on a physical PS5.
To get this to a good state
Choose a landing order for the two PRs, declare the dependency in the later PR, and rebase/test it after its dependency lands. I will rerun the same checks on the updated head.