Repository navigation
Expand file tree
/
Copy pathExport.cpp
More file actions
98 lines (78 loc) · 2.42 KB
/
Copy pathExport.cpp
File metadata and controls
98 lines (78 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#include <cstdint>
#include <cstddef>
#include <mutex>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"
namespace {
constexpr std::int32_t VOICE_QOS_APP_TYPE_GAME = 0x20000000;
constexpr std::int32_t VOICE_QOS_APP_TYPE_10000000 = 0x10000000;
constexpr std::uint32_t VOICE_QOS_MEMORY_SIZE = 0x40000;
constexpr int SCE_VOICE_ERROR_LIBVOICEQOS_NOT_INIT = static_cast<int>(0x804E0901);
constexpr int SCE_VOICE_ERROR_LIBVOICEQOS_ARGUMENT_INVALID = static_cast<int>(0x804E0902);
constexpr int SCE_VOICE_ERROR_LIBVOICEQOS_INITIALIZED = static_cast<int>(0x804E0905);
std::mutex g_mutex;
bool g_initialized = false;
}
extern "C" {
int APS5_VABI sceVoiceQoSInit(void* mem_block, uint32_t mem_size, int32_t app_type) {
std::lock_guard lock(g_mutex);
if (g_initialized) return SCE_VOICE_ERROR_LIBVOICEQOS_INITIALIZED;
if (!mem_block || mem_size != VOICE_QOS_MEMORY_SIZE || (app_type != VOICE_QOS_APP_TYPE_GAME && app_type != VOICE_QOS_APP_TYPE_10000000)) return SCE_VOICE_ERROR_LIBVOICEQOS_ARGUMENT_INVALID;
g_initialized = true;
return 0;
}
int APS5_VABI sceVoiceQoSEnd() {
std::lock_guard lock(g_mutex);
if (!g_initialized) return SCE_VOICE_ERROR_LIBVOICEQOS_NOT_INIT;
g_initialized = false;
return 0;
}
int APS5_VABI sceVoiceQoSCreateLocalEndpoint() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSDeleteLocalEndpoint() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSCreateRemoteEndpoint() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSDeleteRemoteEndpoint() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSConnect() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSDisconnect() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSSetConnectionAttribute() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSSetLocalEndpointAttribute() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSSetRemoteEndpointAttribute() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSReadPacket() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSWritePacket() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceVoiceQoSGetLocalEndpointAttribute() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
}