diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index 45693a80e..b802088ed 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -226,17 +226,19 @@ u32 sceSasSetKeyOn(u32 core, int voiceNum) // sceSasSetKeyOff can be used to start sounds, that just sound during the Release phase! u32 sceSasSetKeyOff(u32 core, int voiceNum) { - DEBUG_LOG(HLE,"0=sceSasSetKeyOff(core=%08x, voiceNum=%i)", core, voiceNum); - - if (voiceNum >= PSP_SAS_VOICES_MAX || voiceNum < 0) - { + if (voiceNum == -1) { + // TODO: Some games (like Every Extend Extra) deliberately pass voiceNum = -1. Does that mean all voices? for now let's ignore. + DEBUG_LOG(HLE,"sceSasSetKeyOff(core=%08x, voiceNum=%i) - voiceNum = -1???", core, voiceNum); + return 0; + } else if (voiceNum < 0 || voiceNum >= PSP_SAS_VOICES_MAX) { WARN_LOG(HLE, "%s: invalid voicenum %d", __FUNCTION__, voiceNum); return ERROR_SAS_INVALID_VOICE; + } else { + DEBUG_LOG(HLE,"0=sceSasSetKeyOff(core=%08x, voiceNum=%i)", core, voiceNum); + SasVoice &v = sas->voices[voiceNum]; + v.KeyOff(); + return 0; } - - SasVoice &v = sas->voices[voiceNum]; - v.KeyOff(); - return 0; } u32 sceSasSetNoise(u32 core, int voiceNum, int freq) diff --git a/native b/native index 618680d37..dbda5f803 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 618680d3792980df42b29ab7bedec4a5f2a802b5 +Subproject commit dbda5f8037e3da7fda5e5ec4cb59a8047c319e38