mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-18 23:07:07 -05:00
feat(libSceVoiceQoS): implement sceVoiceQoSSetRemoteEndpointAttribute
This commit is contained in:
3 files changed
+11
-4
No files matched your search
@@ -140,9 +140,8 @@ int APS5_VABI sceVoiceQoSSetLocalEndpointAttribute(int32_t localId, int32_t attr
|
||||
return Locked([&](QoS& qos) { return SetAttribute(qos.locals, localId, attributeId, value, size); });
|
||||
}
|
||||
|
||||
int APS5_VABI sceVoiceQoSSetRemoteEndpointAttribute() {
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
int APS5_VABI sceVoiceQoSSetRemoteEndpointAttribute(int32_t remoteId, int32_t attributeId, const void* value, int32_t size) {
|
||||
return Locked([&](QoS& qos) { return SetAttribute(qos.remotes, remoteId, attributeId, value, size); });
|
||||
}
|
||||
|
||||
int APS5_VABI sceVoiceQoSReadPacket() {
|
||||
|
||||
@@ -13,6 +13,7 @@ int APS5_VABI sceVoiceQoSDeleteRemoteEndpoint(std::int32_t);
|
||||
int APS5_VABI sceVoiceQoSConnect(std::int32_t*, std::int32_t, std::int32_t);
|
||||
int APS5_VABI sceVoiceQoSDisconnect(std::int32_t);
|
||||
int APS5_VABI sceVoiceQoSSetLocalEndpointAttribute(std::int32_t, std::int32_t, const void*, std::int32_t);
|
||||
int APS5_VABI sceVoiceQoSSetRemoteEndpointAttribute(std::int32_t, std::int32_t, const void*, std::int32_t);
|
||||
}
|
||||
|
||||
static void Require(bool value) { if (!value) std::abort(); }
|
||||
@@ -63,6 +64,12 @@ int main(int argc, char** argv) {
|
||||
Require(sceVoiceQoSSetLocalEndpointAttribute(local, 3, &level, -1) == 0);
|
||||
Require(sceVoiceQoSSetLocalEndpointAttribute(local + 100, 3, &level, sizeof(level)) == argumentInvalid);
|
||||
|
||||
Require(sceVoiceQoSSetRemoteEndpointAttribute(remote, 3, &level, sizeof(level)) == 0);
|
||||
Require(sceVoiceQoSSetRemoteEndpointAttribute(remote, 3, nullptr, sizeof(level)) == argumentInvalid);
|
||||
Require(sceVoiceQoSSetRemoteEndpointAttribute(remote, 3, &level, 0) == 0);
|
||||
Require(sceVoiceQoSSetRemoteEndpointAttribute(remote, 3, &level, -1) == 0);
|
||||
Require(sceVoiceQoSSetRemoteEndpointAttribute(remote + 100, 3, &level, sizeof(level)) == argumentInvalid);
|
||||
|
||||
Require(sceVoiceQoSDisconnect(connection) == 0);
|
||||
Require(sceVoiceQoSDisconnect(connection) == argumentInvalid);
|
||||
Require(sceVoiceQoSDeleteLocalEndpoint(local) == 0);
|
||||
@@ -74,6 +81,7 @@ int main(int argc, char** argv) {
|
||||
Require(sceVoiceQoSEnd() == notInitialized);
|
||||
Require(sceVoiceQoSDeleteRemoteEndpoint(remote) == notInitialized);
|
||||
Require(sceVoiceQoSCreateLocalEndpoint(&local, 1, 0, 0) == notInitialized);
|
||||
Require(sceVoiceQoSSetRemoteEndpointAttribute(remote, 3, &level, sizeof(level)) == notInitialized);
|
||||
Require(sceVoiceQoSInit(memory.data(), 0x40000, appType) == 0);
|
||||
Require(sceVoiceQoSDeleteRemoteEndpoint(remote) == argumentInvalid);
|
||||
Require(sceVoiceQoSEnd() == 0);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
### Unknown function info
|
||||
|
||||
- [sceVoiceQoSSetConnectionAttribute](../../../core/libs/prx/libSceVoiceQoS/Export.cpp) (libSceVoiceQoS, NID `KCGOxg8iX7s`) is a throwing stub declared without parameters, like the other endpoint calls of the library: PPSA04159 fails to load without it and its signature is unknown. The name hashes to the imported NID (`tools/nid_names.py`)
|
||||
- [sceVoiceQoSInit](../../../core/libs/prx/libSceVoiceQoS/Export.cpp) (libSceVoiceQoS) - `0x804E0905` for a second initialization comes from [prosper](https://github.com/mattias800/prosper)'s reading of the module and was not measured: on a PS5 a valid call blocks inside a homebrew payload, so it never returns there. PPSA26344's two call sites (`0xE307BF`, `0x151C45D`) pass an allocated pointer, a 0x40000-byte block and app type 0x10000000; the app type and block are not used. `sceVoiceQoSCreateLocalEndpoint` takes four arguments (`int* id, userId, deviceInId, deviceOutId`) as declared in fpPS4 (`src/ps4_libscevoice.pas`, `ps4_sceVoiceQoSCreateLocalEndpoint`); no public reference exists for the other six signatures (`DeleteLocalEndpoint(id)`, `CreateRemoteEndpoint(int* id)`, `DeleteRemoteEndpoint(id)`, `Connect(int* id, local, remote)`, `Disconnect(connection)`, `SetLocalEndpointAttribute(id, attribute, value, size)`), which are assumed from function naming and call patterns and not confirmed on a PS5 title. Endpoints and connections are tracked by allocated id; duplicate connections and deleting an endpoint while referenced in a connection are permitted as the console is not known to reject them; local endpoint attributes are stored as given (including empty or non-positive sizes), as their ids and defaults are unknown; other endpoint and packet calls remain throwing stubs. The not-initialized error 0x804E0901 is assumed from the 0x804E09xx numbering, and unknown ids return `ARGUMENT_INVALID`. Aliens: Fireteam Elite (PPSA03393) uses all seven implemented calls on its first load path, starting with `sceVoiceQoSCreateLocalEndpoint` when it registers the local talker; it stops with `not implemented` when any of them throws
|
||||
- [sceVoiceQoSInit](../../../core/libs/prx/libSceVoiceQoS/Export.cpp) (libSceVoiceQoS) - `0x804E0905` for a second initialization comes from [prosper](https://github.com/mattias800/prosper)'s reading of the module and was not measured: on a PS5 a valid call blocks inside a homebrew payload, so it never returns there. PPSA26344's two call sites (`0xE307BF`, `0x151C45D`) pass an allocated pointer, a 0x40000-byte block and app type 0x10000000; the app type and block are not used. `sceVoiceQoSCreateLocalEndpoint` takes four arguments (`int* id, userId, deviceInId, deviceOutId`) as declared in fpPS4 (`src/ps4_libscevoice.pas`, `ps4_sceVoiceQoSCreateLocalEndpoint`); no public reference exists for the other seven signatures (`DeleteLocalEndpoint(id)`, `CreateRemoteEndpoint(int* id)`, `DeleteRemoteEndpoint(id)`, `Connect(int* id, local, remote)`, `Disconnect(connection)`, `SetLocalEndpointAttribute(id, attribute, value, size)`), which are assumed from function naming and call patterns and not confirmed on a PS5 title. Endpoints and connections are tracked by allocated id; duplicate connections and deleting an endpoint while referenced in a connection are permitted as the console is not known to reject them; local endpoint attributes are stored as given (including empty or non-positive sizes), as their ids and defaults are unknown; other endpoint and packet calls remain throwing stubs. The not-initialized error 0x804E0901 is assumed from the 0x804E09xx numbering, and unknown ids return `ARGUMENT_INVALID`. Aliens: Fireteam Elite (PPSA03393) uses all eight implemented calls on its first load path, starting with `sceVoiceQoSCreateLocalEndpoint` when it registers the local talker; it stops with `not implemented` when any of them throws
|
||||
|
||||
### Functional
|
||||
|
||||
|
||||
Reference in new issue
Block a user