feat(voice): implement sceVoiceWriteToIPort #571
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/571"
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 Phi1ow on 2026-10-04T22:38:47Z.
What
sceVoiceWriteToIPortwas the last throwing stub inlibSceVoice. It mirrors the existingsceVoiceReadFromOPort: it checks thedataandsizepointers, takes the lock, and requires theport to be an input port. There is no network, so the written frames are accepted and discarded
(the same way reads return no frames), and
sizeis left as the amount written. shadPS4 likewisereturns
ORBIS_OKwithout consuming anything.Adds a
CMakeLists.txtso the library can carry its guest test.Tested
New test
core/libs/tests/GuestVoice.cpp(registered asguest_voice) initializes the library,creates a PCM input port, and writes to it.
Built with MinGW-w64 GCC 15.2.0 (the CI toolchain) on Windows 11;
ctest -R guest_voicepasses.On
mainthe stub throwsnot implemented, so the test aborts without the change.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-04T22:39:09Z.
Progress report (
5fc8755→7a89455)📈 System libraries: 87.11% (+0.03%, +1 implemented functions)
✅ 1 implemented
sceVoiceWriteToIPortImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T23:43:59Z.
Thanks. The NID recomputes (YeJl6yDlhW0 is sceVoiceWriteToIPort), and the checks mirror
sceVoiceReadFromOPort(null pointers, the lock, the port direction). The new CMakeLists follows libSceRtc's pattern, and the test fails on main where the function throws.Two small things:
sceVoiceReadFromOPortalways returning no frames on main, but together they mean that a PCM input port connected to an output port withsceVoiceConnectIPortToOPortnever delivers anything, which is audio, not UI. Neither behaviour is listed in docs/dev/TechnicalDebt.md yet. Could you add a "Silent stubs" line for libSceVoice saying that ports carry no audio (writes are dropped, reads return no frames)? That covers the existing read side as well.IsInputalso accepts the device port (type 0, the microphone). Writing PCM to a microphone port doesn't look meaningful, and I don't know what the console returns for it. Unless you have a source, I'd only accept the PCM and voice input ports here and throw for the device port, with a test row for it.PPSA21564 doesn't import this function. #338 adds
sceVoiceSetMuteFlagright after it in the same file; the two merge cleanly.Imported from boykopovar/AnyPS5. Originally posted by Phi1ow on 2026-10-06T21:52:21Z.
Done. sceVoiceWriteToIPort now accepts only the PCM and voice input ports and throws for the microphone device port, and the test creates a voice input port as well. Added a libSceVoice "Silent stubs" line covering the dropped writes and the empty reads. (The device-port throw isn't a test row: like the other throwing paths it aborts the guest process rather than returning, so it can't be a Require.) guest_voice passes here.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T22:40:44Z.
Thanks for doing both points: only the PCM and voice input ports accept writes, and the libSceVoice silent-stubs line covers the dropped writes and empty reads.
One question remains, which the owner has since asked us to check on every PR: which title calls
sceVoiceWriteToIPort? A silent stub is allowed only when it unblocks a title. If you know one, please name it with the log line where it stops on main.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-07T01:20:41Z.
Following up on the question above: do you know which title calls
sceVoiceWriteToIPort? The code itself looks fine now; the title (with the log line where it stops onmain) is the last thing needed before it can be merged.If no title needs it yet, we'd rather close it for now and reopen it once one does.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T15:47:43Z.
Review: CHANGES_REQUESTED
Thanks for the earlier fixes; the code and the TechnicalDebt line look fine.
sceVoiceWriteToIPort? Please name it, with the log line where it stops onmain. A silent stub is only accepted when it unblocks a title.libSceVoice(onlylibSceVoiceChat), and PPSA21564 doesn't import this function.If no title needs it yet, we'll close it and it can be reopened once one does.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T18:08:17Z.
Closing for now: the points from 2026-10-07 are still open. If you pick it back up, please comment here and it can be reopened.
Pull request closed