docs(libSceAudioOut): name what the emulators do with the length and frequency of sceAudioOutOpen

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
xXPBSXxandClaude Sonnet 5.5 committed 2026-10-31 11:17:09 +01:00
1 parent 833be4af8d
commit 28bd85cb7a
1 file changed
+1
+1
View File
@@ -87,6 +87,7 @@
- [sceAudioOut2PortCreate](../../../core/libs/prx/libSceAudioOut/src/AudioOut2Port.cpp) (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](../../../core/libs/prx/libSceAudioOut/src/AudioOut2Port.cpp) (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. Each set also copies the grain from the buffer: once another port of the context is given the same buffer, the grains already queued with it (and its repeat) play that copy instead of the buffer's later contents, as PPSA08587 fills one buffer and hands it to each of its three ports in turn before advancing. A buffer no other port is given is still read when the grain is pushed. 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
- [sceAudioOutOpen](../../../core/libs/prx/libSceAudioOut/src/AudioOut.cpp) (libSceAudioOut) - format error `0x80260007` (`SCE_AUDIO_OUT_ERROR_INVALID_FORMAT`) follows PS4 comparator [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/0614ce324be092791b758d79f93d9f1ca5b10a81/src/core/libraries/audio/audioout.cpp#L283-L287) (`audioout_error.h`), which rejects formats outside `S16Mono` through `Float_8CH_Std`; console behaviour for a format low byte above 7 and for higher bits is unmeasured. Output buffer checks validate total byte count against `INT32_MAX` on virtual ports, and an oversized vibration pad buffer throws.
- [sceAudioOutOpen](../../../core/libs/prx/libSceAudioOut/src/AudioOut.cpp) (libSceAudioOut) - a length of 0 returns `SCE_AUDIO_OUT_ERROR_INVALID_SIZE` (0x80260006) and a frequency of 0 returns `SCE_AUDIO_OUT_ERROR_INVALID_SAMPLE_FREQ` (0x80260008); every other length and frequency is accepted, which is not measured on hardware. shadPS4 (PS4, `src/core/libraries/audio/audioout.cpp`, commit 0614ce324be092791b758d79f93d9f1ca5b10a81) and fpPS4 (PS4, `src/audio/ps4_libsceaudioout.pas`, commit 04cefd43e6fddd1ab033e7980cd356d14c964905) return those two errors for any length outside 256 to 2048 in steps of 256 and any frequency but 48000. KytyPS5 (PS5, `src/libs/audio.cpp`, commit 5e837a9beac82c031868eaad9348d6a48245fb99) rejects a frequency of 0, as this library does, and checks no length, where this library rejects 0.
- [Legacy vibration ports](../../../core/libs/prx/libSceAudioOut/src/AudioOut.cpp): PPSA99902's [public input wrapper](https://github.com/Nazky/UnleashedRecomp-Prospero/blob/2ce067a1d51bb58670c7ee4a3aed893c504da805/UnleashedRecomp/hid/driver/sdl_hid.cpp#L316) 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](../../../core/libs/prx/libSceAudioOut/src/AudioOut.cpp) (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.