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

32 KiB

libSceAudioOut technical debt

Unknown function info

Functional

  • sceAudioOut2EnableChat (libSceAudioOut) takes no arguments and returns 0, as declared by SharpProspero ("Allows chat audio alongside the application's own"). The host mixes no chat audio and AudioOut2 has no chat port, so the call only records that chat audio is allowed. Whether the console fails it without a chat session, when repeated or before sceAudioOut2Initialize is unknown. sceAudioOut2DisableChat is the counterpart, imported by PPSA18216: it takes no arguments, returns 0 and records that chat audio is no longer allowed; its signature is not confirmed by a console measurement, and whether the console fails it without a chat session or when repeated is unknown.
  • sceAudioOut2Set3DLatency and sceAudioOut2MasteringInit, sceAudioOut2MasteringTerm and sceAudioOut2MasteringSetParam (libSceAudioOut) have no effect: there is no 3D rendering or mastering stage. SetParam accepts the parameter set, and SetSystemDebugState records the debug state id, without anything to apply them to.
  • AudioOut2 contexts (libSceAudioOut) with an SDL device and no sceAudioOut2ContextAdvance calls read a grain's port buffers at the next push, at least 100 us after the grain was pushed, and play the mix behind a 40 ms cushion that the queue level leaves out. When the hardware reads the buffers is not known. The timing follows a title whose mixer fills a buffer after pushing it, reuses it two pushes later, and may still be writing it when the next push follows within microseconds. The last grain pushed before a title stops pushing is never read or played.
  • sceAudioOut2ContextGetQueueLevel (libSceAudioOut) with an SDL device counts the grains that sceAudioOut2ContextAdvance completed and no push has consumed as queued, together with the pushed grains beyond the 40 ms cushion, up to queue_depth. Whether the console counts them is unknown. Pushes that fill the cushion leave the level at 0, so a title that renders as many grains as the level leaves room for and pushes them on another thread rendered a full queue again after each of those pushes: PPSA23226's Wwise sink passes the available count to the sound engine as the number of frames to render, advances once per frame and pushes on a separate thread, and exceeded 16 completed grains. Counted, the completed grains keep such a title at most queue_depth grains ahead of its pushes.
  • sceAudioOutSysGetHdmiMonitorInfo (libSceAudioOut) reports an HDMI sink without a monitor name or audio descriptors: it zeroes the 0x180 bytes and returns 0, since audio reaches the host through SDL as PCM and there is no EDID to describe. The arguments (type, info, size), the required size 0x180 and the fields titles read (monitor name at +0x0B, 13 bytes; descriptor count as a 32-bit value at +0x94; 8-byte descriptors [coding type, channels, rate mask, 0, extra, 0, 0, 0] from +0x98) come from PS5-Audio-Passthrough-Research (firmware 12.70, one monitor). What a console without an HDMI audio sink returns, an error or no descriptors, is unknown. The other bytes, among them the header at +0x90 (01 09 4f 00 on that monitor), have no known meaning and are written as 0. No LPCM descriptor is reported for the host device, as the rate mask and extra byte of one are not known. A null buffer returns 0x80260004 like the other AudioOut calls; the console's code is not measured. Monitor type 0x10, which the console also accepts, other types and sizes other than 0x180 throw: their results and error codes are unknown.