Repository navigation
fix(libSceAudioOut): report the port's channel count from sceAudioOut2PortGetState - #4778
Conversation
|
Linux test (Arch, GCC 16.2.1, Release, PipeWire), this PR merged onto |
…2PortGetState sceAudioOut2PortGetState returned the two channels of the host output for every port. It now reports the channel count of the port's data format and clears the rest of the state, so the reserved fields no longer keep the caller's stack contents. The speaker info and system state calls are unchanged; a new test covers all three, since none had one. The channel count follows SharpEmu, another emulator; no console measurement exists, recorded in TechnicalDebt.md. ASTRO BOT and ASTRO's PLAYROOM reportedly stop on an assertion that depends on the reported state (boykopovar#4317); which field matters is not isolated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1e0c05c to
72fae20
Compare
|
Linux validation (Ubuntu 24.04, GCC 13.3, Release), this PR's commit on AI-assisted: yes |
|
Thank you for the Linux validations, @nicolasfalesy and @coltken95. Noted for the record: the overlap bot lists #5119 for AI-assisted (Claude Code). |
|
Checked on this PR merged onto main: build and ctest of libSceAudioOut (12/12) pass, and |
What
sceAudioOut2PortGetStatereported the two channels of the host output for every port. It now reports the channel count of the port's data format, and clears the whole state first so the reserved fields no longer keep the caller's stack contents. Output (main), volume (127), reroute counter and flags are unchanged.The channel count follows SharpEmu, another emulator. There is no console measurement for it; this is recorded in
docs/dev/debt/libSceAudioOut.md.New test
audio_out2_device_statecoverssceAudioOut2PortGetState(mono, stereo float and S16, 7.1, 7.1.4; invalid and destroyed handle; null state),sceAudioOut2GetSpeakerInfoandsceAudioOut2GetSystemState(null checks and reported values). None of the three had a test before.Related to #4317 (ASTRO BOT PPSA21564, ASTRO's PLAYROOM PPSA01284: assertion
prop->m_pParent == this). That issue has an A/B in which the reported AudioOut2 state decides the assertion, but it has not isolated which field;GetSpeakerInfoandoutputalready match onmain, so the channel count is the only remaining difference to the values described there. This PR does not claim to fix the assertion.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, built and run on
mainffa198407:audio_out2_device_state,audio_out2_port_layouts,audio_out2_port_buffers,audio_out2_pad_mix,audio_out2_latencyandaudio_out2_timingpass (6 of 6).audio_out2_device_statefails without the change toAudioOut2Port.cpp(the mono port reports 2 channels).The branch is rebased onto
main584cc4c57without a conflict in the code (TechnicalDebt.mdmoved todocs/dev/debt/, so the entry is indebt/libSceAudioOut.md). I did not rebuild on thatmain: it needs the newlibusb-cmakesubmodule, which is not available here.python tools/check_conventions.py --base upstream/mainpasses on the rebased branch.The current head
72fae2087is based on6d7b87370, a later rebase than the one described above; it was not rebuilt (not recorded).git merge-treeof it againstmain068ab2aba(13 October) is clean. The overlap bot lists feat(libSceAudioOut): declare 19 AudioOut2 exports by their hash-verified names #5119 fordocs/dev/debt/libSceAudioOut.mdL18, the debt file this change also touches; whichever lands second needs a small rebase there.No title run; ASTRO BOT and ASTRO's PLAYROOM are not available here. Linux not tested. Ports of other types (pad routes) are not covered by the test;
outputstays main for them, as before. A search of open PRs forsceAudioOut2PortGetStatefound only this one.Checklist
Based on current
main; no other open PR implements the same functionsOne 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 in TechnicalDebtNo notes, investigation
.mdfiles or images added to the repositoryNew third-party code is a submodule built from source (none added)
Generic behaviour, not specific to one title
Depends on: none
Unblocks: none
AI-assisted: yes
AI-assisted (Claude Code).
🤖 Generated with Claude Code