feat(libSceVoice): implement sceVoiceInitHQ and sceVoiceVADSetVersion #9082
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9082"
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 YossiYad on 2026-10-21T11:58:43Z.
What
Two libSceVoice calls threw. They now follow shadPS4's voice.cpp:
sceVoiceInitHQ(param, version)runssceVoiceInit: shadPS4's two calls share one init path. A second init through either returns0x804E0802, and aftersceVoiceEndeither initializes again. A null parameter returns0x804E0805from both, as in shadPS4, sincesceVoiceInitonmainnow checks its arguments (version 100 and a known app type).sceVoiceVADSetVersion(version)accepts 0 and 1 and returnsARGUMENT_INVALID(0x804E0805, shadPS4's voice_error.h) for any other version. It does not need the library to be initialized, as in shadPS4. The version is not used, since no voice activity detection runs.Neither is measured on a PS5; the debt entry says so, and the two "unknown signature" lines are removed.
Tested
Linux (Fedora 44, GCC, Ninja,
-DBUILD_TESTING=ON), based onmain47fa6eecf8:guest_voice(core/libs/tests/GuestVoice.cpp) gains VAD versions 0, 1, 2 and -1,sceVoiceInitHQwith a null parameter and a wrong version, initializing through it, the busy result from both init calls, starting after it, andsceVoiceInitHQrefusing after a plainsceVoiceInit. It aborts onmain, and fails whensceVoiceInitHQreturns 0 without initializing, when version 1 is refused, or when every non-negative version is accepted.ctest: 1790 of 1798 pass. The 8 failures fail the same way onmainon this machine and do not link libSceVoice:application_heap_scripting,application_heap_lazy,agc_driver_guest_memory_lifetime,agc_driver_image_array_window_past_layer_limit,agc_driver_tessellationand the threenet_dontwait_blocking_*cases.tools/progress.py --compare: libraries +0.02%, 2 functions implemented, none lost.tools/check_conventions.py --base upstream/mainpasses.tools/pr_overlap.pylists #8989 (other libSceVoice functions: mute-all, bitrate, port update) and #6044 as editing the same files; neither implements these two.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)Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-22T05:33:55Z.
Rebased onto
mainda54c652e(heada596bc316).mainreworkedsceVoiceInit: it now needs version 100 and a known app type, and returns0x804E0805for a null parameter.sceVoiceInitHQstill calls it, so a null parameter now gets0x804E0805here too, as in shadPS4. The test uses version 100 and also checks a wrong version,sceVoiceVADSetVersionusesmain'sInvalidArgumentconstant, and I removed the line in the debt entry about the null parameter differing from shadPS4.guest_voicepasses 3 of 3.