diff --git a/core/libs/prx/libSceVoiceQoS/CMakeLists.txt b/core/libs/prx/libSceVoiceQoS/CMakeLists.txt index 29d56e9ad..31d6ed141 100644 --- a/core/libs/prx/libSceVoiceQoS/CMakeLists.txt +++ b/core/libs/prx/libSceVoiceQoS/CMakeLists.txt @@ -13,9 +13,10 @@ if(BUILD_TESTING) target_include_directories(guest_voice_qos_tests PRIVATE ${LIBS_INCLUDE_DIR}) target_link_libraries(guest_voice_qos_tests PRIVATE libSceVoiceQoS libc) configure_windows_unwind(guest_voice_qos_tests) - add_test(NAME guest_voice_qos COMMAND guest_voice_qos_tests) + add_test(NAME guest_voice_qos COMMAND guest_voice_qos_tests 0x20000000) + add_test(NAME guest_voice_qos_app_type_0x10000000 COMMAND guest_voice_qos_tests 0x10000000) if(WIN32) - set_tests_properties(guest_voice_qos PROPERTIES ENVIRONMENT_MODIFICATION + set_tests_properties(guest_voice_qos guest_voice_qos_app_type_0x10000000 PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$") endif() endif() diff --git a/core/libs/prx/libSceVoiceQoS/Export.cpp b/core/libs/prx/libSceVoiceQoS/Export.cpp index 20ff9b24d..9cc97fe93 100644 --- a/core/libs/prx/libSceVoiceQoS/Export.cpp +++ b/core/libs/prx/libSceVoiceQoS/Export.cpp @@ -9,6 +9,7 @@ namespace { constexpr std::int32_t VOICE_QOS_APP_TYPE_GAME = 0x20000000; +constexpr std::int32_t VOICE_QOS_APP_TYPE_10000000 = 0x10000000; std::mutex g_mutex; bool g_initialized = false; @@ -19,7 +20,7 @@ extern "C" { int APS5_VABI sceVoiceQoSInit(void* mem_block, uint32_t mem_size, int32_t app_type) { if (!mem_block || mem_size == 0) throw std::invalid_argument("sceVoiceQoSInit: null or empty memory block"); - if (app_type != VOICE_QOS_APP_TYPE_GAME) throw std::invalid_argument("sceVoiceQoSInit: unsupported app type " + std::to_string(app_type)); + if (app_type != VOICE_QOS_APP_TYPE_GAME && app_type != VOICE_QOS_APP_TYPE_10000000) throw std::invalid_argument("sceVoiceQoSInit: unsupported app type " + std::to_string(app_type)); std::lock_guard lock(g_mutex); if (g_initialized) throw std::runtime_error("sceVoiceQoSInit: already initialized"); g_initialized = true; diff --git a/core/libs/tests/GuestVoiceQoS.cpp b/core/libs/tests/GuestVoiceQoS.cpp index 9f9e668a6..552a0bf73 100644 --- a/core/libs/tests/GuestVoiceQoS.cpp +++ b/core/libs/tests/GuestVoiceQoS.cpp @@ -20,11 +20,14 @@ static bool Throws(TFunction function) { return false; } -int main() { +int main(int argc, char** argv) { + Require(argc == 2); + const auto appType = static_cast(std::strtoul(argv[1], nullptr, 16)); std::vector memory(0x40000); - Require(Throws([&] { sceVoiceQoSInit(nullptr, 0x40000, 0x20000000); })); - Require(Throws([&] { sceVoiceQoSInit(memory.data(), 0, 0x20000000); })); + Require(Throws([&] { sceVoiceQoSInit(nullptr, 0x40000, appType); })); + Require(Throws([&] { sceVoiceQoSInit(memory.data(), 0, appType); })); Require(Throws([&] { sceVoiceQoSInit(memory.data(), 0x40000, 0); })); - Require(sceVoiceQoSInit(memory.data(), 0x40000, 0x20000000) == 0); - Require(Throws([&] { sceVoiceQoSInit(memory.data(), 0x40000, 0x20000000); })); + Require(Throws([&] { sceVoiceQoSInit(memory.data(), 0x40000, 0x30000000); })); + Require(sceVoiceQoSInit(memory.data(), 0x40000, appType) == 0); + Require(Throws([&] { sceVoiceQoSInit(memory.data(), 0x40000, appType); })); } diff --git a/docs/dev/TechnicalDebt.md b/docs/dev/TechnicalDebt.md index b57c3f774..cf46e3ec9 100644 --- a/docs/dev/TechnicalDebt.md +++ b/docs/dev/TechnicalDebt.md @@ -83,7 +83,7 @@ Throughout the project, every function at every stage either **does exactly what - [scePsmlMfsrGetContextBufferRequirement1100, scePsmlMfsrCreateContext1100, scePsmlMfsrGetDispatchMfsrPacket1100](../../core/libs/prx/libScePsml_debug/Export.cpp) (libScePsml_debug) - argument layouts unknown; only 0x8A810001 (not initialized) is returned - [BnMAMrsfVWo](../../core/libs/prx/libc/src/HeapDiagnostics.cpp) (libc) - unknown name, signature - [scePngEncEncode](../../core/libs/prx/libScePngEnc/Export.cpp) (libScePngEnc) - whether rows may stay unfiltered when `filter_type` names a subset of the filters is unknown; as in shadPS4, they may only for 0 and for the all-filters mask -- [sceVoiceQoSInit](../../core/libs/prx/libSceVoiceQoS/Export.cpp) (libSceVoiceQoS) - the error codes are unknown: a null or empty memory block, an app type other than 0x20000000 (the value PPSA14632 passes) and a second initialization throw. The minimum memory size is unknown and the block is not used, as no endpoint is implemented +- [sceVoiceQoSInit](../../core/libs/prx/libSceVoiceQoS/Export.cpp) (libSceVoiceQoS) - the error codes are unknown: a null or empty memory block, an app type other than 0x20000000 (PPSA14632) or 0x10000000 (PPSA26344) and a second initialization throw. The minimum memory size is unknown; the app type and the block are not used, as no endpoint is implemented - AudioIn, NpSessionSignaling and PlayerInvitationDialog exports added without an implementation have assumed signatures - [vieBRwlh1Lw](../../core/libs/prx/libSceAgc/Unimplemented.cpp) (libSceAgc) - unknown name, signature - [fCWdlnmB1Ks](../../core/libs/prx/libScePad/Export.cpp) (libScePad) - unknown name, signature