Error returns

This commit is contained in:
kalaposfos13 2025-07-19 12:03:32 +02:00
parent c717226412
commit ec5985ac00

View File

@ -171,7 +171,16 @@ int PS4_SYSV_ABI sceAudioOutGetInfoOpenNum() {
int PS4_SYSV_ABI sceAudioOutGetLastOutputTime(s32 handle, u64* output_time) { int PS4_SYSV_ABI sceAudioOutGetLastOutputTime(s32 handle, u64* output_time) {
LOG_DEBUG(Lib_AudioOut, "called"); LOG_DEBUG(Lib_AudioOut, "called");
if (!output_time) {
return ORBIS_AUDIO_OUT_ERROR_INVALID_POINTER;
}
if (handle >= ports_out.size()) {
return ORBIS_AUDIO_OUT_ERROR_INVALID_PORT;
}
auto& port = ports_out.at(handle - 1); auto& port = ports_out.at(handle - 1);
if (!port.IsOpen()) {
return ORBIS_AUDIO_OUT_ERROR_NOT_OPENED;
}
*output_time = port.last_output_time; *output_time = port.last_output_time;
return ORBIS_OK; return ORBIS_OK;
} }