Libraries: Implement sceAudio3dTerminate (#3247)

* sceAudio3dTerminate

My First Gran Turismo® (CUSA49696) uses this while initializing it's audio system. Without it, the game spams errored sceAudio3dInitialize calls.

* Properly close AudioOut handle

Based on library decompilation.
This commit is contained in:
Stephen Miller 2025-07-15 07:48:05 -05:00 committed by GitHub
parent 97daee836a
commit bf623d4f85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -526,7 +526,14 @@ s32 PS4_SYSV_ABI sceAudio3dStrError() {
} }
s32 PS4_SYSV_ABI sceAudio3dTerminate() { s32 PS4_SYSV_ABI sceAudio3dTerminate() {
LOG_ERROR(Lib_Audio3d, "(STUBBED) called"); LOG_INFO(Lib_Audio3d, "called");
if (!state) {
return ORBIS_AUDIO3D_ERROR_NOT_READY;
}
AudioOut::sceAudioOutOutput(state->audio_out_handle, nullptr);
AudioOut::sceAudioOutClose(state->audio_out_handle);
state.release();
return ORBIS_OK; return ORBIS_OK;
} }