Files
AnyPS5/core/libs/prx/libSceAudioOut/src/AudioOut2System.cpp
T
Celegans12andClaude Opus 5.5 0404752111 feat(audioout): implement sceAudioOut2Set3DLatency and accept sceAudioOut2MasteringInit(0)
PPSA26344 calls sceAudioOut2Set3DLatency(0xFF, 2) right after
sceAudioOut2Initialize and fails its audio initialization on a negative
return; the export was missing, so the import did not resolve. Its
audio subsystem setup also calls sceAudioOut2MasteringInit(0), which
threw.

sceAudioOut2Set3DLatency accepts a latency of 2 for the system user
(0xFF) and throws for any other user or latency, as the unit and range
are unknown. sceAudioOut2MasteringInit accepts flags 0 and throws for
other flags. There is no 3D rendering or mastering stage, so neither
call changes the output; TechnicalDebt lists this under Functional and
the assumed signatures under Unknown function info.

The new audio_out2_latency test covers the accepted and thrown values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:23 +02:00

32 lines
805 B
C++

#include <cstdint>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"
static constexpr int USER_ID_SYSTEM = 0xFF;
static constexpr std::uint32_t SUPPORTED_3D_LATENCY = 2;
extern "C" {
int APS5_VABI sceAudioOut2Initialize(void) {
return 0;
}
int APS5_VABI sceAudioOut2Set3DLatency(int userId, std::uint32_t latency) {
if (userId != USER_ID_SYSTEM || latency != SUPPORTED_3D_LATENCY) NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceAudioOut2GetSystemState(AudioOut2SystemState* state) {
if (!state) return static_cast<int>(0x80260502);
state->loudness = 0.0f;
return 0;
}
int APS5_VABI sceAudioOut2SetSystemDebugState(const AudioOut2SystemDebugStateParam* param) {
(void)param;
NotImplemented_nid_no_patch(__func__);
return 0;
}
}