29 KiB
libSceAudioOut technical debt
Unknown function info
-
sceAudioOut2ContextAdvance and sceAudioOut2ContextPush (libSceAudioOut) - with an SDL device, Advance snapshots each port's PCM and gain; Push consumes completed grains in order and a blocking Push waits for Advance when none is ready. Inferred from PPSA26358, which rewrites the same 512-frame, 12-channel float buffer on a producer thread and pushes on another thread. Console buffer ownership, snapshot timing and empty-queue errors are unverified. Completed grains remain queued until Push consumes them, so memory use grows with an unconsumed PCM backlog. The console backlog limit is unverified. A nonblocking Push without a completed grain throws; this is a runtime restriction, not a console measurement. Context destruction concurrent with active calls remains unsupported. Without an SDL device the existing wall-clock path remains.
-
sceAudioOut2UserGetSupportedAttributes - the PS5 module confirms a pointer-sized user handle and two optional uint32 outputs. Handles 0/-1 return 0x80268010 before checking outputs; two null outputs return 0x80268001. Host masks still describe only implemented PCM/gain support, unlike native SDK- and device-dependent masks. Unknown or destroyed host handles throw; native arbitrary handles are pointers and cannot be validated by the host registry. Port ownership and busy-user destruction remain unimplemented.
-
sceAudioOutExOpen, sceAudioOutExConfigureOutput, sceAudioOutExClose (libSceAudioOut) - the HDMI bitstream calls follow PS5-Audio-Passthrough-Research, which disassembles firmware 12.70's libSceAudioOut and logs the calls on a console.
sceAudioOutExOpen(user, mode)returns0x80260015for a mode above 10 or outside mask0x61F; otherwise it opens a port of internal type 6 in S16 stereo, 256 frames at 48000 Hz for modes 0, 1, 2 and 9 and 1024 frames at 192000 Hz for modes 3, 4 and 10.sceAudioOutExConfigureOutput(control, flags, mode, target, option)returns0x80268009whencontrolis not 0, takes modes 0 to 10 and 0xFF and targets 1 to 3 and 0xFF, and returned 0 on the console;sceAudioOutExClosereturned 0. The argument registers match Jelly5 and PPSA99051's bitstream_out.cpp. Audio reaches the host through SDL as PCM and the host has no HDMI bitstream output, so an Ex port has no host device:sceAudioOutOutputpaces it at its own rate and drops its IEC 61937 bursts, andsceAudioOutExConfigureOutputchanges nothing. Nonzeroflagsoroption, other modes or targets,sceAudioOutExCloseof a handle that is not an Ex port, andsceAudioOutGetPortStateon an Ex port throw, since the console's answers are unknown -
sceAudioOutExGetMonitorInfo - native validation requires first argument zero, a non-null buffer and exactly 1024 bytes, in that order (errors 0x80260003/04/06); the second argument is ignored. The host still reports no audio descriptors by zeroing the record. Native content comes from monitor/device services and system audio configuration, which the SDL backend does not reproduce.
-
sceAudioOut2Set3DLatency (libSceAudioOut) - the two 32-bit arguments and selector validation match the system library: selector 0 accepts outputs 0 through 2; selector 255 accepts outputs 1 and 2. No third latency argument exists. The host has no system 3D rendering stage, so the call still does not apply latency and does not reproduce the system initialization and output-availability checks.
-
sceAudioOut2MasteringInit - native initialization requires AudioOut2 initialization (0x80268006 otherwise), returns success immediately when already initialized, and otherwise rejects nonzero flags with 0x80268201. Term returns 0x80268203 without mastering initialization and clears the mastering state after a successful service call. The protected Init body remains unchanged; host Term still returns success without this lifecycle or native mastering allocations.
-
sceAudioOut2MasteringGetState and sceAudioOut2MasteringSetParam (libSceAudioOut) - the state layout, the states ids 1 (default) and 2 (V2), the descriptor ids
0x01010001,0x01020001and0x01010003and the errors0x80268201and0x80268204follow KytyPS5, not a console measurement. GetState zeroes the states and writes the two descriptors; with no mastering stage the compressor and limiter values stay zero. SetParam accepts any parameter set and records nothing, as KytyPS5 does; a null parameter returns0x80268201, the mastering invalid-API-parameter error KytyPS5 returns for a null state, which is an inference rather than a measurement. The meaning ofoutputanduseris unknown and both are ignored -
sceAudioOut2SetSystemDebugState (libSceAudioOut) - records the debug state id in the trace and returns 0, as KytyPS5 does; the host has no system mix to apply it to. The debug state ids are unknown, so every id is accepted, and a null param returns
0x80260502like the other AudioOut2 calls. Not measured on a console -
sceAudioOut2GetSpeakerArrayCoefficients (libSceAudioOut) - validates the handle and the coefficient count like the ambisonics call, then writes the front pair at full gain and silence for every other speaker, ignoring the position, spread, height awareness and downmix spread radius: KytyPS5 and prosper both return that pair. The console's VBAP gains over the array's directions are not measured
-
sceAudioOutSetMixLevelPadSpk (libSceAudioOut) - no source applies the level (shadPS4 only stores it); it is assumed to be a linear gain on the port's own output, and the -9 dB default (11626) is applied to every pad speaker port, including those of titles that never call the function
-
sceAudioOutGetLastOutputTime (libSceAudioOut) - signature and behaviour taken from the shadPS4 and fpPS4 reimplementations of the PS4 library, not confirmed on a PS5 title: the time is the process time at which
sceAudioOutOutputorsceAudioOutOutputsaccepted the port's last block, not the time the block reached the device -
sceAudioOutSysOpen, sceAudioOutSysConfigureOutput, sceAudioOutSysClose (libSceAudioOut) - imported by PPSA99051 and PPSA99997, which fail to load without them; the signatures follow EVO-PLAYER-PS5, whose audio code both titles share, and are not confirmed on a console.
sceAudioOutSysOpen(user, mode)opens a port only for mode 5, the TrueHD MAT route: the same project's carrier table, read from sceAudioOutExOpen's own tables in firmware 12.70, describes it as a 768 kHz port of 1024 S16 8-channel frames whose 16-byte frames are consumed at 192 kHz; every other mode throws. Audio reaches the host through SDL as PCM and the host has no HDMI bitstream output, so like an Ex port a Sys port has no host device:sceAudioOutOutputpaces it at its own rate and drops the MAT bursts.sceAudioOutSysConfigureOutput(type, flags, mode, target, option)accepts only the observed(1, 0, 5, 1, 0)HDMI MAT switch and changes nothing; other arguments throw.sceAudioOutSysClosecloses a Sys port and throws for any other handle. The restore path EVO-PLAYER-PS5 takes after a Sys port callssceAudioOutExConfigureOutput(0, 0, 0xFF, 0xFF, 0), so no Sys reset combination is known -
sceAudioOut2PortCreate (libSceAudioOut) - MAIN (type 0) format validation follows PS5 firmware 13.60 measurements: bits 8-11 accept 1, 2, 8 or 12, bits 0-6 accept 0 or 1, bit 7 requires 8 channels, and bits 12-31 do not affect validation. The sample types are still read as float and int16; bit 7's layout, the PCM effect of bits 12-31 and the port
flagsare unverified. Other port types retain unverified format validation, including 6 channels and rejection of bits 12-31 -
sceAudioOut2PortCreate (libSceAudioOut) - 12 channels are assumed to be L R C LFE Ls Rs Lb Rb Ltf Rtf Ltb Rtb as in KytyPS5's 12-to-8 fold, and 6 and 8 channels to be its first 6 and 8; no title or SDK header confirms the order
-
sceAudioOut2PortCreate (libSceAudioOut) - the stereo fold is assumed, not the console's downmix: C at -3 dB into both sides, Ls/Rs, Lb/Rb and Ltf/Rtf at -3 dB and Ltb/Rtb at -6 dB into their own side, LFE dropped
-
sceAudioOut2PortSetAttributes (libSceAudioOut) - each PCM buffer set (attribute 0) is taken as one grain: buffers set between two pushes are queued and played one per grain, at most 16 queued. A grain with no new buffer repeats the last one only when the port has always been given that same buffer (rewritten in place); a port whose buffers move on plays silence instead. Inferred from PPSA12544, whose object port (type 6) is given one grain of a 64-grain ring per set, often two or three between pushes and then none for a few; the console behaviour for several sets per push and for a push without a new buffer is not documented
-
Legacy vibration ports: PPSA99902's public input wrapper opens type 10 with 256 stereo S16 or F32 frames at 48000 Hz. Mono duplicates its channel as AudioOut2 does; wider vibration layouts throw. Native controller output uses AudioOut2's four-channel layout, or its six-channel PulseAudio mapping. Without a controller sound card the existing RMS motor transform is applied to segments of at most 256 frames, scheduled by the legacy queue's frame count and rate; drain and close remove only that port's segments. Concurrent sources combine by the maximum per motor, and the pad consumer uses this approximation only for controllers other than DualSense. This host timing and motor model is not a console measurement or waveform reproduction; legacy native output is unmeasured on hardware, and user routing retains the single-controller limitation. AudioOut2 retains its separate 80 ms peak hold.
-
sceAudioOutDeviceIdOpen (libSceAudioOut) - the native wrapper consumes a 64-bit device ID, port type, sample count, frequency and format from argument slots 1, 2, 4, 5 and 6. Slot 3 is discarded, with the common open API index position preserved. Device enumeration and mapping to host outputs remain unimplemented; the throwing body is unchanged.
-
sceAudioOut2PortGetState and sceAudioOut2GetSpeakerInfo (libSceAudioOut) - the port state reports the channel count of the port's data format, output main, volume 127 and a zero reroute counter and flags. Taking the channel count from the data format follows SharpEmu, another emulator. A payload process on a PS5 (firmware 13.60), which is not the foreground application, read output 0, volume -1 and reroute counter 5 for its main ports, and 6 channels for an 8-channel port on a 5.1 system, so a title's values are unverified, including the output of a pad port, the volume after
sceAudioOut2PortSetAttributesand the reroute counter on a device change. The speaker info reports type 0 with available bits0x3, the front left speaker at +30 degrees and the front right one at -30, and -360 for the azimuth and elevation of every other slot. On that console the type followed the HDMI device type and the available bits its channels: type 0 with the device set to TV, 1 to AV amplifier and 2 to sound bar, which SharpProspero names television, AV receiver and sound bar (3 is headphones there), and available bits0x3for 2 channels and0x3Ffor 5.1 (centre at 0, surround pair at +110 and -110, -360 for the LFE). The front pair and the empty slots read the same in every setting; 7.1 on the AV amplifier reported 2 channels on that console's HDMI chain. The host output is always reported as a stereo television here. The console also returns0x80268006beforesceAudioOut2Initialize,0x80268001for flags above 1 and0x8026800Cfor a null pointer, which are not modelled. ASTRO BOT and ASTRO's PLAYROOM reportedly stop on an assertion that depends on these values (#4317), but which field matters has not been isolated -
sceAudioOut2UserCreateEx (libSceAudioOut) - unknown signature
-
sceAudioOutOpenEx (libSceAudioOut) - unknown signature
-
sceAudioOutSetSystemDebugState (libSceAudioOut) - unknown signature
-
sceAudioOutGetHandleStatusInfo (libSceAudioOut) - unknown signature
-
sceAudioOutGetSimulatedHandleStatusInfo2 (libSceAudioOut) - unknown signature
-
sceAudioOutChangeAppModuleState (libSceAudioOut) - unknown signature
-
sceAudioOutGetSimulatedHandleStatusInfo (libSceAudioOut) - unknown signature
-
sceAudioOutGetSimulatedBusUsableStatusByBusType (libSceAudioOut) - unknown signature
-
sceAudioOutAttachToApplicationByPid (libSceAudioOut) - unknown signature
-
sceAudioOutDetachFromApplicationByPid (libSceAudioOut) - unknown signature
-
sceAudioOutPtOpen (libSceAudioOut) - unknown signature
-
sceAudioOutPtClose (libSceAudioOut) - unknown signature
-
sceAudioOutPtGetLastOutputTime (libSceAudioOut) - unknown signature
-
sceAudioOutExPtOpen (libSceAudioOut) - unknown signature
-
sceAudioOutExPtClose (libSceAudioOut) - unknown signature
-
sceAudioOutExPtGetLastOutputTime (libSceAudioOut) - unknown signature
-
sceAudioOutExGetLastOutputTime (libSceAudioOut) - unknown signature
-
sceAudioOutGetInfoOpenNum (libSceAudioOut) - unknown signature
-
sceAudioOutGetInfo (libSceAudioOut) - unknown signature
-
sceAudioOutMasteringInit (libSceAudioOut) - unknown signature
-
sceAudioOutMasteringSetParam (libSceAudioOut) - unknown signature
-
sceAudioOutMasteringGetState (libSceAudioOut) - unknown signature
-
sceAudioOutMasteringTerm (libSceAudioOut) - unknown signature
-
sceAudioOutSetPadSpkVolume (libSceAudioOut) - unknown signature
-
sceAudioOutSetPadJackVolume (libSceAudioOut) - unknown signature
-
sceAudioOutSetUsbVolume (libSceAudioOut) - unknown signature
-
sceAudioOutSetCaesarVolume (libSceAudioOut) - unknown signature
-
sceAudioOutSetHeadphoneOutMode (libSceAudioOut) - unknown signature
-
sceAudioOutGetFocusEnablePid (libSceAudioOut) - unknown signature
-
sceAudioOutSetMainOutput (libSceAudioOut) - unknown signature
-
sceAudioOutSetVolumeDown (libSceAudioOut) - unknown signature
-
sceAudioOutSetChatBalance (libSceAudioOut) - unknown signature
-
sceAudioOutSetRecMode (libSceAudioOut) - unknown signature
-
sceAudioOutSetAllMute (libSceAudioOut) - unknown signature
-
sceAudioOutSetSparkEQ (libSceAudioOut) - unknown signature
-
sceAudioOutArbitrationInitialize (libSceAudioOut) - unknown signature
-
sceAudioOut2ArbitrationInitialize (libSceAudioOut) - unknown signature
-
sceAudioOutEnable3DAudioByArbitration (libSceAudioOut) - unknown signature
-
sceAudioOutAssignHRTF (libSceAudioOut) - unknown signature
-
sceAudioOutEnable3DAudioForUser (libSceAudioOut) - unknown signature
-
sceAudioOutEnableMonoHpOutput (libSceAudioOut) - unknown signature
-
sceAudioOutEnableTVVirtual (libSceAudioOut) - unknown signature
-
sceAudioOutEnableTVCorrection (libSceAudioOut) - unknown signature
-
sceAudioOutEnableVrControllerLowPowerMode (libSceAudioOut) - unknown signature
-
sceAudioOutEnableCinematicVrRotation (libSceAudioOut) - unknown signature
-
sceAudioOutCustomHrtfIsExist (libSceAudioOut) - unknown signature
-
sceAudioOutExConfigureOutputMode (libSceAudioOut) - unknown signature
-
sceAudioOutExSystemInfoIsSupportedAudioOutExMode (libSceAudioOut) - unknown signature
-
sceAudioOutExGetSystemInfo (libSceAudioOut) - unknown signature
-
sceAudioOutExGetOutputInfo (libSceAudioOut) - unknown signature
-
sceAudioOutSysConfigureOutputMode (libSceAudioOut) - unknown signature
-
sceAudioOutSysGetMonitorInfo (libSceAudioOut) - unknown signature
-
sceAudioOutSysHdmiMonitorInfoIsSupportedAudioOutMode (libSceAudioOut) - unknown signature
-
sceAudioOutSysGetSystemInfo (libSceAudioOut) - unknown signature
-
sceAudioOutSysGetOutputInfo (libSceAudioOut) - unknown signature
-
sceAudioOut2MbusInit (libSceAudioOut) - unknown signature
-
sceAudioOut2MbusSetPortConnections (libSceAudioOut) - unknown signature
-
sceAudioOut2MbusSetConnections (libSceAudioOut) - unknown signature
-
sceAudioOut2MbusSetPortStatuses (libSceAudioOut) - unknown signature
-
sceAudioOut2MbusSetHeadphoneOutMode (libSceAudioOut) - unknown signature
-
sceAudioOut2MbusUserLoginFor3DAudio (libSceAudioOut) - unknown signature
-
sceAudioOut2MbusSetDeviceConnections (libSceAudioOut) - unknown signature
-
sceAudioOut2MbusSetMorpheusParam (libSceAudioOut) - unknown signature
-
sceAudioOut2MbusSetCaesarParam (libSceAudioOut) - unknown signature
-
sceAudioOut2MbusSetSparkParam (libSceAudioOut) - unknown signature
-
sceAudioOut2AllAudioMainToHeadphoneForDiag (libSceAudioOut) - unknown signature
-
sceAudioOut2LoPortGetStateEx (libSceAudioOut) - unknown signature
-
sceAudioOut2LoTerminate (libSceAudioOut) throws. It takes no arguments and returns an int, and stops the low-latency service (SharpProspero), but what it does to open contexts and ports and what it returns when the service is not started are unknown, and its counterpart
sceAudioOut2Terminateis unimplemented. -
sceAudioOut2ReportRegisterHandler (libSceAudioOut) - unknown signature
-
sceAudioOut2ReportUnregisterHandler (libSceAudioOut) - unknown signature
-
sceAudioOut2GetTvCorrectionInfo (libSceAudioOut) - unknown signature
-
sceAudioOut2GetIpcHandle (libSceAudioOut) - unknown signature
-
sceAudioOut2GetSystemStateEx (libSceAudioOut) - unknown signature
-
sceAudioOut2MasteringInitEx (libSceAudioOut) - unknown signature
-
sceAudioOut2SetDebugHeadphoneMode (libSceAudioOut) - unknown signature
-
sceAudioOut2DebugStateCtrl (libSceAudioOut) - unknown signature
-
sceAudioOut2ContextBedWrite (libSceAudioOut) - unknown signature
-
sceAudioOut2PortCreateEx (libSceAudioOut) - unknown signature
-
sceAudioOut2InitializeEx (libSceAudioOut) - unknown signature
-
sceAudioOut2Terminate (libSceAudioOut) - unknown signature
-
sceAudioOut2PortRegister (libSceAudioOut) - unknown signature
-
sceAudioOut2PortUnregister (libSceAudioOut) - unknown signature
-
sceAudioOut2GetAmbisonicsEncodeCoefficients (libSceAudioOut) - unknown signature
-
sceAudioOut2GetHrtfIdForCronos (libSceAudioOut) - unknown signature
Functional
- sceAudioOut2EnableChat and sceAudioOut2DisableChat - both PS5 exports take no arguments, return 0x80268006 before AudioOut2 initialization, and invoke the system chat service with selector 3. A negative service result maps to 0x80268000, otherwise they return zero. The host only records a local enabled flag, without initialization validation or a chat service; repeated-call and no-session behavior therefore still depends on the missing service.
- sceAudioOut2Set3DLatency (libSceAudioOut) - the two 32-bit arguments and selector validation match the system library: selector 0 accepts outputs 0 through 2; selector 255 accepts outputs 1 and 2. No third latency argument exists. The host has no system 3D rendering stage, so the call still does not apply latency and does not reproduce the system initialization and output-availability checks.
- AudioOut2 contexts (libSceAudioOut) with an SDL device and no
sceAudioOut2ContextAdvancecalls 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
sceAudioOut2ContextAdvancecompleted and no push has consumed as queued, together with the pushed grains beyond the 40 ms cushion, up toqueue_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 mostqueue_depthgrains ahead of its pushes. - sceAudioOut2LoInit, sceAudioOut2LoContext* and sceAudioOut2LoPort* calls (libSceAudioOut) have no low-latency path: each forwards to its
sceAudioOut2counterpart, so grain and queue depth are the context'snum_grainsandqueue_depth, and playback keeps the 40 ms cushion. SharpProspero only says each call takes the same handles and parameter blocks as its counterpart and drives the low-latency clock with a shallow queue and a small grain (docs). Unverified: the console's grain and depth limits, its error for a handle of the other service (accepted here) and whatsceAudioOut2LoInitreturns when repeated (0 here). - sceAudioOutSysGetHdmiMonitorInfo - native validation requires a non-null buffer and exactly 384 bytes, then accepts types 1 and 16. Mapped pointer/size/type errors are 0x80260004/06/0C. The host still zeroes type 1 output and throws for type 16: native monitor descriptors and system audio settings are unavailable. Driver initialization failures and service errors are not represented.