added sceAudioOutGetSystemState

This commit is contained in:
georgemoralis 2026-02-08 21:25:02 +02:00
parent 24354c5a30
commit 6de3459598
2 changed files with 22 additions and 8 deletions

View File

@ -206,7 +206,7 @@ s32 PS4_SYSV_ABI sceAudioOutInit() {
return ORBIS_AUDIO_OUT_ERROR_ALREADY_INIT;
}
audio = std::make_unique<SDLAudioOut>();
audio = std::make_unique<OpenALAudioOut>();
LOG_INFO(Lib_AudioOut, "Audio system initialized");
return ORBIS_OK;
@ -729,7 +729,7 @@ s32 PS4_SYSV_ABI sceAudioOutSetVolume(s32 handle, s32 flag, s32* vol) {
}
s32 PS4_SYSV_ABI sceAudioOutSetMixLevelPadSpk(s32 handle, s32 mixLevel) {
LOG_ERROR(Lib_AudioOut, "(STUBBED) called");
LOG_INFO(Lib_AudioOut, "(STUBBED) called");
if (lazy_init.load(std::memory_order_relaxed) == 0 || audio == nullptr) {
LOG_ERROR(Lib_AudioOut, "audio is not init");
return ORBIS_AUDIO_OUT_ERROR_NOT_INIT;
@ -769,6 +769,19 @@ s32 PS4_SYSV_ABI sceAudioOutSetMixLevelPadSpk(s32 handle, s32 mixLevel) {
return ORBIS_OK;
}
s32 PS4_SYSV_ABI sceAudioOutGetSystemState(OrbisAudioOutSystemState* state) {
if (lazy_init.load(std::memory_order_relaxed) == 0 || audio == nullptr) {
LOG_ERROR(Lib_AudioOut, "audio is not init");
return ORBIS_AUDIO_OUT_ERROR_NOT_INIT;
}
if (state == nullptr) {
return ORBIS_AUDIO_OUT_ERROR_INVALID_POINTER;
}
memset(state, 0, sizeof(*state));
LOG_DEBUG(Lib_AudioOut, "called");
return ORBIS_OK;
}
/*
* Stubbed functions
**/
@ -892,11 +905,6 @@ s32 PS4_SYSV_ABI sceAudioOutGetSparkVss() {
return ORBIS_OK;
}
s32 PS4_SYSV_ABI sceAudioOutGetSystemState() {
LOG_ERROR(Lib_AudioOut, "(STUBBED) called");
return ORBIS_OK;
}
s32 PS4_SYSV_ABI sceAudioOutInitIpmiGetSession() {
LOG_ERROR(Lib_AudioOut, "(STUBBED) called");
return ORBIS_OK;

View File

@ -97,6 +97,12 @@ struct OrbisAudioOutPortState {
u64 reserved64[2];
};
struct OrbisAudioOutSystemState {
float loudness;
u8 reserved8[4];
u64 reserved64[3];
};
struct AudioFormatInfo {
bool is_float;
u8 sample_size;
@ -162,7 +168,7 @@ s32 PS4_SYSV_ABI sceAudioOutGetSimulatedBusUsableStatusByBusType();
s32 PS4_SYSV_ABI sceAudioOutGetSimulatedHandleStatusInfo();
s32 PS4_SYSV_ABI sceAudioOutGetSimulatedHandleStatusInfo2();
s32 PS4_SYSV_ABI sceAudioOutGetSparkVss();
s32 PS4_SYSV_ABI sceAudioOutGetSystemState();
s32 PS4_SYSV_ABI sceAudioOutGetSystemState(OrbisAudioOutSystemState* state);
s32 PS4_SYSV_ABI sceAudioOutInit();
s32 PS4_SYSV_ABI sceAudioOutInitIpmiGetSession();
s32 PS4_SYSV_ABI sceAudioOutMasteringGetState();