fix(orbis): better fix for orbis voicechat crash

This most likely can be fixed a more proper way but this is what works and is better then the previous method
This commit is contained in:
str1k3r
2026-07-18 01:19:10 -04:00
parent 388626dbba
commit 6ee614dfda
2 changed files with 6 additions and 7 deletions
@@ -26,8 +26,6 @@ static const int sc_thresholdValue = 100;
static const bool sc_verbose = false;
static const int sce_voice_port = 25566; // str1k3r - use of SCE_VOICE_INVALID_PORT_ID causes a crash when loading / making worlds.
// #define _USE_PCM_AUDIO_
//#define USE_PCM_MIC_DATA
@@ -43,14 +41,14 @@ static void CreatePort(uint32_t *portId, const SceVoicePortParam *pArg)
int err = sceVoiceCreatePort( portId, pArg );
assert(err == SCE_OK);
assert(*portId != sce_voice_port);
assert(*portId != VOICE_INVALID_PORT_ID);
C4JThread::PopAffinity(); // PS4 only
}
static void DeletePort(uint32_t& port)
{
int32_t result;
if (port != sce_voice_port)
if (port != VOICE_INVALID_PORT_ID)
{
result = sceVoiceDeletePort( port );
if (result != SCE_OK)
@@ -58,7 +56,7 @@ static void DeletePort(uint32_t& port)
app.DebugPrintf("sceVoiceDeletePort failed %0x\n", result);
assert(0);
}
port = sce_voice_port;
port = VOICE_INVALID_PORT_ID;
}
}