End clears the init flag set by sceVoiceQoSInit and returns 0, so the
library can be initialized again. Before an initialization it returns
0x804E0901 (LIBVOICEQOS_NOT_INIT), as measured on a PS5 (firmware 13.60)
in #1407.
LEGO Horizon Adventures (PPSA14632) calls it at shutdown and Ghost of
Yotei (PPSA26344) calls it on its sceVoiceQoSInit failure branch.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 25fbc944faddc5fb3519c4ce4b8d3600b3bc9e1b)
Measured on a PS5 (firmware 13.60) through dlopen of
libSceVoiceQoS.sprx: a null block, any size other than exactly 0x40000,
and an app type other than 0x20000000 or 0x10000000 all return
0x804E0902 without touching the block, instead of throwing. A second
initialization returns 0x804E0905, as prosper reads from the module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sceVoiceQoSInit accepted only app type 0x20000000 and threw for every
other value. PPSA26344 v1.008 passes 0x10000000 at both of its call
sites, so its initialization threw.
Accept 0x10000000 as a second known app type. Its meaning is unknown,
so the constant is named after the value, and it is handled like
0x20000000; the block stays unused. A null or empty block, a second
initialization and every other app type still throw.
guest_voice_qos_tests now takes the app type as its argument and runs
in ctest once per accepted value, because sceVoiceQoSEnd still throws
and one process can initialize only once.
A title passes a work memory block and app type 0x20000000, and turns
voice chat off when initialization fails. Initialization now records
the library as initialized and succeeds. A null or empty memory block,
another app type and a second initialization throw, as their error
codes are unknown.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>