feat(libSceVoice): implement mute-all, bitrate and port update #8989
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8989"
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 simonbronk on 2026-10-21T08:46:54Z.
What
Implements 3 libSceVoice exports that threw, on the existing port model:
sceVoiceSetMuteFlagAll(bool): a library-wide flag that makessceVoiceGetMuteFlagreport every port as muted without changing the ports' own flags, as the PS Vita documentation in VitaSDK describes (RPCS3 also leaves the port flags alone);sceVoiceEndclears it.sceVoiceSetBitRate(uint32_t, uint32_t): encoded voice ports only, assceVoiceGetBitRatealready requires.sceVoiceUpdatePort(uint32_t, const VoicePortParam*): updates mute, volume and, on encoded voice ports, the bitrate; a different port type throws, since VitaSDK documents that the type cannot change.The debt file listed these as "unknown signature"; the signatures are in the Orbital type database and match VitaSDK, the source the library already cites for
sceVoicePausePort/sceVoiceResetPort. Those three lines are removed and replaced by one entry stating what is not measured, including that any bitrate is stored (assceVoiceCreatePortalready does) where the Vita accepts onlySceVoiceBitRatevalues. libSceVoice goes from 23 to 26 of 36 intools/progress.py.sceVoicePausePortAllandsceVoiceResumePortAllare left to #8852, which was opened first and implements them.Tested
macOS 27 (Apple silicon), clang, C++20:
libSceVoice/Export.cppand the tests compiled outside CMake, since the full build does not run on macOS.guest_voice(core/libs/tests/GuestVoice.cpp, extended here with mute-all, bitrate, update, rejected type change and the reset aftersceVoiceEnd) andguest_voice_port_attrpass. The CMake/ctest build on Linux and Windows was not run locally.check_conventions.pyis clean.Export.cppand the test merge cleanly with #8852;docs/dev/debt/libSceVoice.mdhas an adjacent-line conflict with it, resolved by keeping both entries. No title tested.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 github-actions[bot] on 2026-10-21T08:47:46Z.
Progress report (
cc00785→bec1289)📈 System libraries: 43.26% (+0.03%, +3 implemented functions)
✅ 3 implemented
sceVoiceSetBitRatesceVoiceSetMuteFlagAllsceVoiceUpdatePortImported from boykopovar/AnyPS5. Originally posted by clairtonmichel on 2026-10-21T09:09:51Z.
Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):
guest_voice,guest_voice_chat,guest_voice_qos, port attributes, etc.): 100% passed successfully (8/8 green in 0.02s).Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-21T14:36:03Z.
Rebased on main after #8852 was merged: \sceVoicePausePortAll/\sceVoiceResumePortAll\ and their debt entry and tests are now main's, so this PR only adds \sceVoiceSetMuteFlagAll, \sceVoiceSetBitRate\ and \sceVoiceUpdatePort\ (one commit). Windows 11, WinLibs GCC, CMake/ctest: \guest_voice, \guest_voice_chat\ and \guest_voice_port_attr\ pass; \check_conventions.py --base upstream/main\ is clean.
Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-21T18:17:00Z.
Linux run of c51727f14 merged onto
main99844c7ee(clean merge).Environment: Ubuntu 24.04 x86-64 container under Rosetta on Apple Silicon (Colima), GCC 13,
RelWithDebInfo,BUILD_TESTING=ON,ANYPS5_ENABLE_ASAN=ON. ASan builds dynamic executables, so this is not the CI configuration.Results: the full build has no errors. the 8 tests matching
voice, includingguest_voice: all pass, with no AddressSanitizer report.Not run: the static CI configuration, native x86-64 hardware, GPU tests, a title.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-22T09:07:12Z.
Rebased on
maind6eafa54d.mainhas since rewritten libSceVoice to return the module's codes (0x804E0801 not initialized, 0x804E0804 port above 127, 0x804E0807 missing port) instead of throwing, so I redid the three functions on that model instead of carrying the old ones over:sceVoiceSetMuteFlagAll(bool)returns 0x804E0801 beforesceVoiceInit. Otherwise it sets a library-wide flag that makessceVoiceGetMuteFlagreport every port muted, without changing the port flags.sceVoiceEndclears it.sceVoiceSetBitRate(port, bitrate)andsceVoiceUpdatePort(port, param)return the same not-initialized, port-range and missing-port codes as the other port calls. Bitrates go through the tablesceVoiceCreatePortuses, which I moved into a shared helper, so the port's frame size follows the new bitrate.Tested: Linux, Ubuntu 24.04 x86-64 container under Rosetta (Colima), GCC 13, RelWithDebInfo with ASan, merged onto
maind6eafa54d: all 8voicetests pass, no ASan reports.check_conventions.py --base origin/mainpasses.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-22T09:47:56Z.
A correction to my comment above: the Tested line there was wrong. My new checks in
GuestVoice.cppredeclaredbitrate, whichmain's tests further down also declare, soguest_voice_testsdidn't compile in that run. The "8 tests pass" came from binaries of an older build. Sorry for the noise.bec128911renames the variable in my checks toportBitrate.Tested again, building the targets explicitly and checking the exit code: Linux, Ubuntu 24.04 x86-64 container (Colima/Rosetta), GCC 13, ASan, merged onto
main7e2ba73e4.cmake --build --target libSceVoice guest_voice_testsexits 0 andguest_voicepasses.AI-assisted: yes