Files
AnyPS5/docs/dev/debt/libSceVoiceQoS.md
T
Dean Galvin 44437edfb1 test(libSceVoiceQoS): keep the module citation and rejection checks for GetLocalEndpointAttribute
The rebase onto main dropped main's 4.03 module citation for the selector and size table and its checks of every rejected selector and size. The debt entry names the module again, and the test again checks selectors -1, 4, 7, 9 and 100, the wrong sizes for 0/2/6, 1/3/5 and 8, and endpoint local + 1; all of them still return the invalid-argument error before any port call. Fix-up on Eduardo Ruiz's change.
2026-11-07 08:39:34 +13:00

5.3 KiB

libSceVoiceQoS technical debt

Silent stubs

  • sceVoiceQoSReadPacket (libSceVoiceQoS) - network voice packet streaming is not implemented: it returns 0 and writes size 0 (indicating no packet is available). Aliens: Fireteam Elite (PPSA03393) calls it on its startup path (0x76D14C-0x76D16E) and stops with not implemented if it throws
  • sceVoiceQoSWritePacket (libSceVoiceQoS) - network voice packet streaming is not implemented: it returns 0 leaving *size untouched (treating all input bytes as accepted). Aliens: Fireteam Elite (PPSA03393) sets *size to the packet size before WritePacket (0x76CEB9-0x76CEC4), compares *size against that input size upon return (0x76CF07-0x76CF10) to verify all bytes were accepted, and stops with not implemented if it throws

Unknown function info

Functional

  • libSceVoiceQoS: initialization arguments, initialization errors, endpoint and connection argument lists, and the no-argument End path are confirmed by the supplied module. The 11.00 module's Initialize builds a 40-byte libSceVoice init parameter with the QoS app type and calls sceVoiceInit(..., 100) at 0x6e8, returning its error, then calls sceVoiceStart with the caller's memory block and the 0x40000 size at 0x70b, calling sceVoiceEnd if it fails; End calls sceVoiceStop and then sceVoiceEnd at 0xb34/0xb39 and returns the latter's result. The host mirrors that lifecycle, so the title must not initialize libSceVoice itself and gets the already-initialized error if it does. The QoS pool allocation, the signaling sockets and the remaining internal object state are not modelled. End deletes the local endpoint ports and clears host state. Connecting an uncreated port throws.
  • sceVoiceQoSCreateLocalEndpoint: creates the input and output device ports through sceVoiceCreatePort with the confirmed parameter template (port types 0 and 5, device types 0 and 2, the given user and device IDs, volume 1.0) and returns the libSceVoice error unchanged; when the output port fails it deletes the input port first. Local ID zero, the single-slot limit, the -1 output on exhaustion and the 0x804E0907 limit error for a repeated or -1 user are confirmed.
  • sceVoiceQoSCreateRemoteEndpoint and sceVoiceQoSConnect: remote/connection slot allocation from zero, seven/fifteen slot capacities, exhaustion outputs, and reuse of released slots are recovered; the endpoints allocate slots without creating ports. Remote endpoint deletion clears the first matching connection. Shared encoder ownership, codec parameters and packet accounting are still missing.
  • sceVoiceQoSSetLocalEndpointAttribute: local selectors 0/2 forward a four-byte float to sceVoiceSetVolume on the input/output port and 1/3 a one-byte flag to sceVoiceSetMuteFlag; unsupported selectors and sizes return the confirmed invalid-argument error. Without a created local endpoint the call returns the invalid-argument error instead of addressing libSceVoice port 0, which is a real handle a title can own. Remote selector 7 still throws until remote endpoint ports exist.
  • sceVoiceQoSGetLocalEndpointAttribute: the 4.03 module (libSceVoiceQoS.sprx, SHA-256 5427cd36c68bcab64e5ccecdca92f8e54a7a11d80191a21e9a02f29eca73858d, export eZu2RP0Ma3w#D#A at VA 0x1530) accepts only local endpoint 0 and non-null output, then a selector table of 0/2/6 (four bytes), 1/3/5 (one byte) and 8 (two bytes); selectors 4 and 7 and any other id or size return the confirmed invalid-argument error, and valid reads reach the voice-port parameter getters keyed by the two port handles. Local selectors 0..3 read volume and mute from the two local ports. Selectors 5, 6 and 8 call sceVoiceGetPortAttr with 1001, 1002 and 1003, which still throws for device attributes in libSceVoice. Other selectors return the invalid-argument error; the local ID must be zero and the value non-null. Without a created local endpoint it returns the invalid-argument error and does not read a title-owned libSceVoice port 0.
  • sceVoiceQoSGetLocalEndpoint and sceVoiceQoSGetRemoteEndpoint: all in-range connection slots are queryable, including unused slots returning endpoint ID -1. Disconnecting an unused in-range slot succeeds. These state rules are confirmed; the packet and status getters containing NotImplemented_nid_no_patch remain unchanged.
  • sceVoiceQoSEnableChat, sceVoiceQoSDisableChat and sceVoiceQoSInitHQ: zero-argument chat wrappers validate initialization and throw because the chat backend is unimplemented; sceVoiceQoSInitHQ forwards directly to sceVoiceQoSInit. The sceVoiceQoSInitHQ forwarding and the chat wrappers' not-initialized result are not measured on a console and mirror the libSceVoice behaviour.