Files
AnyPS5/docs/dev/debt/libSceVoice.md
T

6.2 KiB

libSceVoice technical debt

Functional

  • Voice resource and port state: resource information is eight bytes containing four 16-bit limits selected by initialization mode. Reset, pause and resume use confirmed initialization, range and missing-port errors; repeated pause/resume succeed. GetPortInfo preserves unused output fields and reports native frame sizes, but still reports a constant ready state and does not reproduce stopped-state or snapshot-slot errors. The host has no buffered voice processing or device reset backend, so reset only covers empty software ports and pause flags currently affect no audio. Initialization validates native modes and version 100, but still lacks event callback delivery and backend creation. Port creation enforces recovered format and resource limits, but does not allocate device or codec backends.
  • sceVoiceEnableChat and sceVoiceDisableChat: zero-argument signatures and the not-initialized error are confirmed. Initialized calls throw because the required audio chat backend is not implemented; they no longer report success for a local flag change.

Unknown function info

  • sceVoiceVADAdjustment - throws through NotImplemented_nid_no_patch; behaviour and the PS5 prototypes are unmeasured. The only source of the parameter lists is shadPS4's PS4-derived prototypes (GPLv2, used as a reference only), with no second reference; structure pointers are void* because no layout is known.

  • sceVoiceInit, sceVoiceStart, sceVoiceCreatePort, sceVoiceGetPortInfo (libSceVoice) - a second sceVoiceInit returns 0x804E0802, and Start, CreatePort and GetPortInfo return 0x804E0801 before checking any argument while the library is not initialized, as prosper reads them from the shipped module. The other port and lifecycle calls still throw when the library is not initialized, since prosper gives no module address for them. Whether sceVoiceInit checks a null param before its state is unknown, so a null param still throws first, and that sceVoiceEnd returns the library to the not-initialized state is assumed. Closes when: the other entry points are read from the module or measured on a PS5

  • sceVoiceInitHQ, sceVoiceVADSetVersion (libSceVoice) - not measured on a PS5: the signatures and rules follow shadPS4. sceVoiceInitHQ runs sceVoiceInit, as shadPS4's two share one path. sceVoiceVADSetVersion accepts versions 0 and 1 and returns 0x804E0805 for any other; nothing uses the version, as no voice activity detection runs

  • sceVoicePausePortAll, sceVoiceResumePortAll (libSceVoice) - not measured on a PS5: both return 0x804E0801 while the library is not initialized and 0 otherwise, as in shadPS4; prosper reads the same code for sceVoiceStart, and the PS3 calls in RPCS3 make the same check. Like sceVoicePausePort they change nothing that is reported: VitaSDK documents that pausing every port keeps the buffered data and the reported state, and nothing here processes port data

  • sceVoiceGetMemorySize (libSceVoice) - unknown signature

  • sceVoiceDeviceInCustomerData (libSceVoice) - unknown signature

  • sceVoiceQAEnableRecording (libSceVoice) - unknown signature

  • sceVoiceVADPVTAdjustment (libSceVoice) - unknown signature

  • sceVoiceSetMuteFlagAll, sceVoiceSetBitRate, sceVoiceUpdatePort (libSceVoice) - not measured on a PS5; signatures follow Orbital, behaviour the Vita's VitaSDK. They return the not-initialized, port-range and missing-port codes the other port calls return. The mute-all flag makes sceVoiceGetMuteFlag report every port muted without changing port flags. A non-voice port, a bitrate sceVoiceCreatePort rejects, a null param or a different port type throw, since the console's codes for them are unknown

  • sceVoiceGetPortAttr: native initialization, port-range, pointer, attribute-size and port-type validation is implemented. Supported device attributes throw because the host has no device state or voice-activity processing. The former constant-zero voice-activity fallback is removed; failed calls leave output untouched.

  • sceVoiceSetThreadsParams: the priorities and affinity masks that mode 1 sets reach no host scheduling, because no voice worker threads run (see sceVoiceStart below). Mode 1 returns 0 for priorities 256-767 with non-zero masks within 0x1fff, the values a PS5 thread takes; the native result for other values is unverified, so they throw. The 32-byte event callback union is recovered, but callback delivery and device-state byte semantics remain unimplemented.

  • sceVoiceStart, sceVoiceStop and sceVoiceEnd validate initialization, container presence and native mode-dependent memory sizes, but do not partition guest working memory or run the audio workers. Start/stop currently change software state only; backend failures and active-stream shutdown are not reproduced.