From 0a38bb51bcaf1e37269df0ce5780c7d3dcb11fe2 Mon Sep 17 00:00:00 2001 From: str1k3r <115313679+S1l3ntStr1ke87@users.noreply.github.com> Date: Fri, 17 Jul 2026 13:45:53 -0400 Subject: [PATCH] fix(orbis): voicechat crash --- Minecraft.Client/Orbis/Network/SonyVoiceChat_Orbis.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Minecraft.Client/Orbis/Network/SonyVoiceChat_Orbis.cpp b/Minecraft.Client/Orbis/Network/SonyVoiceChat_Orbis.cpp index 9ca6d90b..48e6f566 100644 --- a/Minecraft.Client/Orbis/Network/SonyVoiceChat_Orbis.cpp +++ b/Minecraft.Client/Orbis/Network/SonyVoiceChat_Orbis.cpp @@ -26,6 +26,8 @@ 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 @@ -41,14 +43,14 @@ static void CreatePort(uint32_t *portId, const SceVoicePortParam *pArg) int err = sceVoiceCreatePort( portId, pArg ); assert(err == SCE_OK); - assert(*portId != SCE_VOICE_INVALID_PORT_ID); + assert(*portId != sce_voice_port); C4JThread::PopAffinity(); // PS4 only } static void DeletePort(uint32_t& port) { int32_t result; - if (port != SCE_VOICE_INVALID_PORT_ID) + if (port != sce_voice_port) { result = sceVoiceDeletePort( port ); if (result != SCE_OK) @@ -56,7 +58,7 @@ static void DeletePort(uint32_t& port) app.DebugPrintf("sceVoiceDeletePort failed %0x\n", result); assert(0); } - port = SCE_VOICE_INVALID_PORT_ID; + port = sce_voice_port; } }