vivox-sdk-node 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +7 -0
- package/README.md +62 -0
- package/README.txt +10 -0
- package/binding.gyp +57 -0
- package/index.d.ts +249 -0
- package/index.js +279 -0
- package/package.json +41 -0
- package/src/vivox_addon.cpp +443 -0
- package/vivox_sdk/include/Vxc.h +3319 -0
- package/vivox_sdk/include/VxcErrors.h +300 -0
- package/vivox_sdk/include/VxcEvents.h +2608 -0
- package/vivox_sdk/include/VxcExports.h +83 -0
- package/vivox_sdk/include/VxcRequests.h +5589 -0
- package/vivox_sdk/include/VxcResponses.h +2255 -0
- package/vivox_sdk/include/VxcTypes.h +627 -0
- package/vivox_sdk/include/vivox-config.h +19 -0
- package/vivox_sdk/lib/vivoxsdk.dll +0 -0
- package/vivox_sdk/lib/vivoxsdk.lib +0 -0
|
@@ -0,0 +1,3319 @@
|
|
|
1
|
+
/* Copyright (c) 2019 Unity Technologies.
|
|
2
|
+
*
|
|
3
|
+
* This software is subject to, and made available under, the Unity Terms of Service (see Unity Terms of Service).
|
|
4
|
+
* Your use of this software constitutes your acceptance of such terms.
|
|
5
|
+
|
|
6
|
+
* Unless expressly provided otherwise, the software under this license is made available strictly on an "AS IS" BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
|
|
7
|
+
* Please review the Terms of Service for details on these and other terms and conditions.”
|
|
8
|
+
*/
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#include <VxcExports.h>
|
|
12
|
+
#include <VxcTypes.h>
|
|
13
|
+
|
|
14
|
+
#define VIVOX_SDK_HAS_CRASH_REPORTING 1
|
|
15
|
+
#define VIVOX_SDK_HAS_VOICE_FONTS 1
|
|
16
|
+
#define VIVOX_SDK_HAS_GROUP_IM 1
|
|
17
|
+
#define VIVOX_SDK_HAS_MUTE_SCOPE 1
|
|
18
|
+
#define VIVOX_SDK_HAS_PARTICIPANT_TYPE 1
|
|
19
|
+
#define VIVOX_SDK_HAS_NETWORK_MESSAGE 1
|
|
20
|
+
#define VIVOX_SDK_HAS_AUX_DIAGNOSTIC_STATE 1
|
|
21
|
+
#define VIVOX_SDK_SESSION_RENDER_AUDIO_OBSOLETE 1
|
|
22
|
+
#define VIVOX_SDK_SESSION_GET_LOCAL_AUDIO_INFO_OBSOLETE 1
|
|
23
|
+
#define VIVOX_SDK_SESSION_MEDIA_RINGBACK_OBSOLETE 1
|
|
24
|
+
#define VIVOX_SDK_SESSION_CONNECT_OBSOLETE 1
|
|
25
|
+
#define VIVOX_SDK_EVT_SESSION_PARTICIPANT_LIST_OBSOLETE 1
|
|
26
|
+
#define VIVOX_SDK_HAS_INTEGRATED_PROXY 1
|
|
27
|
+
#define VIVOX_SDK_HAS_NO_CHANNEL_FOLDERS 1
|
|
28
|
+
#define VIVOX_SDK_HAS_NO_SCORE 1
|
|
29
|
+
#define VIVOX_SDK_HAS_GENERIC_APP_NOTIFICATIONS_ONLY 1
|
|
30
|
+
#define VIVOX_SDK_HAS_FRAME_TOTALS 1
|
|
31
|
+
#define VIVOX_SDK_NO_LEGACY_RECORDING 1
|
|
32
|
+
#define VIVOX_SDK_NO_IS_AD_PLAYING 1
|
|
33
|
+
#define VIVOX_SDK_HAS_ACCOUNT_SEND_MSG 1
|
|
34
|
+
#define VIVOX_SDK_HAS_PLC_STATS 1
|
|
35
|
+
#define VIVOX_SDK_HAS_DEVICE_ADDED_REMOVED 1
|
|
36
|
+
#define VIVOX_SDK_HAS_AUDIO_UNIT_CALLBACKS 1
|
|
37
|
+
|
|
38
|
+
#pragma pack(push)
|
|
39
|
+
#pragma pack(8)
|
|
40
|
+
|
|
41
|
+
#ifdef __cplusplus
|
|
42
|
+
extern "C" {
|
|
43
|
+
#endif
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A request cookie type.
|
|
47
|
+
* Used when passing in requests to the SDK.
|
|
48
|
+
*/
|
|
49
|
+
typedef char *VX_COOKIE;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* A generic handle type for state objects (for example: accounts, connectors, sessions, or session groups).
|
|
53
|
+
*/
|
|
54
|
+
typedef VX_COOKIE VX_HANDLE;
|
|
55
|
+
|
|
56
|
+
typedef unsigned int VX_SDK_HANDLE;
|
|
57
|
+
|
|
58
|
+
typedef __time64_t vx_time_t;
|
|
59
|
+
|
|
60
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
61
|
+
/**
|
|
62
|
+
* Allocate and initialize a cookie.
|
|
63
|
+
* \ingroup memorymanagement
|
|
64
|
+
*/
|
|
65
|
+
VIVOXSDK_DLLEXPORT int vx_cookie_create(const char *value, VX_COOKIE *cookie);
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Free a cookie.
|
|
69
|
+
* \ingroup memorymanagement
|
|
70
|
+
*/
|
|
71
|
+
VIVOXSDK_DLLEXPORT int vx_cookie_free(VX_COOKIE *cookie);
|
|
72
|
+
#endif
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A type of STUN probe.
|
|
76
|
+
*/
|
|
77
|
+
typedef enum {
|
|
78
|
+
/**
|
|
79
|
+
* Use the default as configured on the account management server.
|
|
80
|
+
*/
|
|
81
|
+
attempt_stun_unspecified = 0,
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Use STUN.
|
|
85
|
+
*/
|
|
86
|
+
attempt_stun_on = 1,
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Do not use STUN.
|
|
90
|
+
*/
|
|
91
|
+
attempt_stun_off = 2
|
|
92
|
+
} vx_attempt_stun;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* A type of API mode.
|
|
96
|
+
* The required setting is connector_mode_normal.
|
|
97
|
+
*/
|
|
98
|
+
typedef enum {
|
|
99
|
+
/**
|
|
100
|
+
* The default and only valid value.
|
|
101
|
+
*/
|
|
102
|
+
connector_mode_normal = 0,
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* \deprecated This is deprecated and should not be used.
|
|
106
|
+
* @deprecated
|
|
107
|
+
*/
|
|
108
|
+
connector_mode_legacy = 1
|
|
109
|
+
} vx_connector_mode;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* A type of API mode.
|
|
113
|
+
* The recommended setting is connector_mode_normal.
|
|
114
|
+
*/
|
|
115
|
+
typedef enum {
|
|
116
|
+
/**
|
|
117
|
+
* Each handle is unique for the lifetime of the connector.
|
|
118
|
+
*/
|
|
119
|
+
session_handle_type_unique = 0,
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Handles are sequential integers.
|
|
123
|
+
*/
|
|
124
|
+
session_handle_type_legacy = 1,
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Handles are hierarchical numeric.
|
|
128
|
+
*/
|
|
129
|
+
session_handle_type_heirarchical_numeric = 2,
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Handles are hierarchical unique.
|
|
133
|
+
*/
|
|
134
|
+
session_handle_type_heirarchical_unique = 3
|
|
135
|
+
} vx_session_handle_type;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* A type of logging for the application.
|
|
139
|
+
* The Vivox SDK is capable of logging to a native log file and/or sending log information
|
|
140
|
+
* to the client application through a callback method registered with the SDK.
|
|
141
|
+
*/
|
|
142
|
+
typedef enum {
|
|
143
|
+
/**
|
|
144
|
+
* Unused.
|
|
145
|
+
*/
|
|
146
|
+
log_to_none = 0,
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* \deprecated File logging is not supported. Use log_to_none instead.
|
|
150
|
+
* Log to the native configured logfile.
|
|
151
|
+
* @deprecated
|
|
152
|
+
*/
|
|
153
|
+
log_to_file = 1,
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Send log information to the client application through the registered callback method.
|
|
157
|
+
*/
|
|
158
|
+
log_to_callback = 2,
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* \deprecated File logging is not supported. Use log_to_callback instead.
|
|
162
|
+
* Log to the native configured log file and the client application through the registered callback method.
|
|
163
|
+
* @deprecated
|
|
164
|
+
*/
|
|
165
|
+
log_to_file_and_callback = 3
|
|
166
|
+
} vx_log_type;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Used as a run time type indicator for all messages passed between the application and SDK.
|
|
170
|
+
*/
|
|
171
|
+
typedef enum {
|
|
172
|
+
/**
|
|
173
|
+
* Unused.
|
|
174
|
+
*/
|
|
175
|
+
msg_none = 0,
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Indicates that the message is a request.
|
|
179
|
+
* @see vx_req_base_t
|
|
180
|
+
*/
|
|
181
|
+
msg_request = 1,
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Indicates that the message is a response.
|
|
185
|
+
* @see vx_resp_base_t
|
|
186
|
+
*/
|
|
187
|
+
msg_response = 2,
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Indicates that the message is an event.
|
|
191
|
+
* @see vx_evt_base_t
|
|
192
|
+
*/
|
|
193
|
+
msg_event = 3
|
|
194
|
+
} vx_message_type;
|
|
195
|
+
|
|
196
|
+
typedef enum {
|
|
197
|
+
/**
|
|
198
|
+
* Stop a recording.
|
|
199
|
+
*/
|
|
200
|
+
VX_SESSIONGROUP_RECORDING_CONTROL_STOP = 0,
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Start a recording.
|
|
204
|
+
*/
|
|
205
|
+
VX_SESSIONGROUP_RECORDING_CONTROL_START = 1,
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Flush a continuous recording.
|
|
209
|
+
*/
|
|
210
|
+
VX_SESSIONGROUP_RECORDING_CONTROL_FLUSH_TO_FILE = 2
|
|
211
|
+
} vx_sessiongroup_recording_control_type;
|
|
212
|
+
|
|
213
|
+
typedef enum {
|
|
214
|
+
/**
|
|
215
|
+
* Stop audio injection.
|
|
216
|
+
*/
|
|
217
|
+
VX_SESSIONGROUP_AUDIO_INJECTION_CONTROL_STOP = 0,
|
|
218
|
+
vx_sessiongroup_audio_injection_control_stop = VX_SESSIONGROUP_AUDIO_INJECTION_CONTROL_STOP,
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Start audio injection (only if currently stopped).
|
|
222
|
+
*/
|
|
223
|
+
VX_SESSIONGROUP_AUDIO_INJECTION_CONTROL_START = 1,
|
|
224
|
+
vx_sessiongroup_audio_injection_control_start = VX_SESSIONGROUP_AUDIO_INJECTION_CONTROL_START,
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Restart audio injection (start if currently stopped, or stop if currently injecting and then restart).
|
|
228
|
+
*/
|
|
229
|
+
VX_SESSIONGROUP_AUDIO_INJECTION_CONTROL_RESTART = 2,
|
|
230
|
+
vx_sessiongroup_audio_injection_control_restart = VX_SESSIONGROUP_AUDIO_INJECTION_CONTROL_RESTART,
|
|
231
|
+
|
|
232
|
+
VX_SESSIONGROUP_AUDIO_INJECTION_CONTROL_MIN = VX_SESSIONGROUP_AUDIO_INJECTION_CONTROL_STOP,
|
|
233
|
+
vx_sessiongroup_audio_injection_control_min = vx_sessiongroup_audio_injection_control_stop,
|
|
234
|
+
VX_SESSIONGROUP_AUDIO_INJECTION_CONTROL_MAX = VX_SESSIONGROUP_AUDIO_INJECTION_CONTROL_RESTART,
|
|
235
|
+
vx_sessiongroup_audio_injection_control_max = vx_sessiongroup_audio_injection_control_restart
|
|
236
|
+
} vx_sessiongroup_audio_injection_control_type;
|
|
237
|
+
|
|
238
|
+
typedef enum {
|
|
239
|
+
/**
|
|
240
|
+
* Stop playback.
|
|
241
|
+
* When playback is stopped, it closes the playback file and generates a media frame played event,
|
|
242
|
+
* with 0 for the first frame, and 0 for the total frames.
|
|
243
|
+
*/
|
|
244
|
+
VX_SESSIONGROUP_PLAYBACK_CONTROL_STOP = 0,
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Start playback.
|
|
248
|
+
*/
|
|
249
|
+
VX_SESSIONGROUP_PLAYBACK_CONTROL_START = 1,
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Pause playback.
|
|
253
|
+
*/
|
|
254
|
+
VX_SESSIONGROUP_PLAYBACK_CONTROL_PAUSE = 3,
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Unpause playback.
|
|
258
|
+
*/
|
|
259
|
+
VX_SESSIONGROUP_PLAYBACK_CONTROL_UNPAUSE = 4
|
|
260
|
+
} vx_sessiongroup_playback_control_type;
|
|
261
|
+
|
|
262
|
+
typedef enum {
|
|
263
|
+
/**
|
|
264
|
+
* Normal mode playback.
|
|
265
|
+
*/
|
|
266
|
+
VX_SESSIONGROUP_PLAYBACK_MODE_NORMAL = 0,
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Vox mode playback: Catch-up mode.
|
|
270
|
+
* Skip all silence periods.
|
|
271
|
+
* Playback at desired speed.
|
|
272
|
+
*/
|
|
273
|
+
VX_SESSIONGROUP_PLAYBACK_MODE_VOX = 1
|
|
274
|
+
} vx_sessiongroup_playback_mode;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* The methods in which communication can be controlled.
|
|
278
|
+
*/
|
|
279
|
+
typedef enum {
|
|
280
|
+
/**
|
|
281
|
+
* The issuing user does not hear the blocked user, and the blocked user does not hear the issuing user.
|
|
282
|
+
*/
|
|
283
|
+
vx_control_communications_operation_block = 0,
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* The issuing user does hear the blocked user, and the blocked user does hear the issuing user,
|
|
287
|
+
* unless the blocked user has also blocked the issuing user.
|
|
288
|
+
*/
|
|
289
|
+
vx_control_communications_operation_unblock = 1,
|
|
290
|
+
vx_control_communications_operation_list = 2,
|
|
291
|
+
vx_control_communications_operation_block_list = 2, // Alias for vx_control_communications_operation_list
|
|
292
|
+
vx_control_communications_operation_clear = 3,
|
|
293
|
+
vx_control_communications_operation_clear_block_list = 3, // Alias for vx_control_communications_operation_clear
|
|
294
|
+
vx_control_communications_operation_mute = 4,
|
|
295
|
+
vx_control_communications_operation_unmute = 5,
|
|
296
|
+
vx_control_communications_operation_mute_list = 6,
|
|
297
|
+
vx_control_communications_operation_clear_mute_list = 7
|
|
298
|
+
} vx_control_communications_operation;
|
|
299
|
+
|
|
300
|
+
typedef enum {
|
|
301
|
+
media_type_none = 0,
|
|
302
|
+
media_type_text = 1,
|
|
303
|
+
media_type_audio = 2,
|
|
304
|
+
media_type_video = 3,
|
|
305
|
+
media_type_audiovideo = 4
|
|
306
|
+
} vx_media_type;
|
|
307
|
+
|
|
308
|
+
typedef enum {
|
|
309
|
+
termination_status_none = 0,
|
|
310
|
+
termination_status_busy = 1,
|
|
311
|
+
termination_status_decline = 2
|
|
312
|
+
} vx_termination_status;
|
|
313
|
+
|
|
314
|
+
typedef enum {
|
|
315
|
+
diagnostic_dump_level_all = 0,
|
|
316
|
+
diagnostic_dump_level_sessions = 1
|
|
317
|
+
} vx_diagnostic_dump_level;
|
|
318
|
+
|
|
319
|
+
typedef enum {
|
|
320
|
+
media_ringback_none = 0,
|
|
321
|
+
media_ringback_ringing = 1, // 180
|
|
322
|
+
// media_ringback_answer = 2, // 200
|
|
323
|
+
media_ringback_busy = 3, // 486
|
|
324
|
+
// media_ringback_terminated = 4 // 487
|
|
325
|
+
} vx_media_ringback;
|
|
326
|
+
|
|
327
|
+
typedef enum {
|
|
328
|
+
channel_type_normal = 0,
|
|
329
|
+
channel_type_positional = 2
|
|
330
|
+
} vx_channel_type;
|
|
331
|
+
|
|
332
|
+
typedef enum {
|
|
333
|
+
channel_mode_none = 0,
|
|
334
|
+
channel_mode_normal = 1,
|
|
335
|
+
channel_mode_presentation = 2,
|
|
336
|
+
channel_mode_lecture = 3,
|
|
337
|
+
channel_mode_open = 4,
|
|
338
|
+
channel_mode_auditorium = 5
|
|
339
|
+
} vx_channel_mode;
|
|
340
|
+
|
|
341
|
+
typedef enum {
|
|
342
|
+
channel_search_type_all = 0,
|
|
343
|
+
channel_search_type_non_positional = 1,
|
|
344
|
+
channel_search_type_positional = 2
|
|
345
|
+
} vx_channel_search_type;
|
|
346
|
+
|
|
347
|
+
typedef enum {
|
|
348
|
+
channel_moderation_type_all = 0,
|
|
349
|
+
channel_moderation_type_current_user = 1
|
|
350
|
+
} vx_channel_moderation_type;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* The type of the session group specified at session group creation time.
|
|
354
|
+
*/
|
|
355
|
+
typedef enum {
|
|
356
|
+
/**
|
|
357
|
+
* Normal type for general use.
|
|
358
|
+
*/
|
|
359
|
+
sessiongroup_type_normal = 0,
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Playback type.
|
|
363
|
+
* Only use this for playing back a Vivox recording.
|
|
364
|
+
* \note Live sessions cannot be added to this type of session group.
|
|
365
|
+
*/
|
|
366
|
+
sessiongroup_type_playback = 1
|
|
367
|
+
} vx_sessiongroup_type;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Indicates the reason why a participant was removed from a session.
|
|
371
|
+
*/
|
|
372
|
+
typedef enum {
|
|
373
|
+
participant_left = 0,
|
|
374
|
+
participant_timeout = 1,
|
|
375
|
+
participant_kicked = 2,
|
|
376
|
+
participant_banned = 3
|
|
377
|
+
} vx_participant_removed_reason;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Indicates current network connection state
|
|
381
|
+
*/
|
|
382
|
+
typedef enum {
|
|
383
|
+
connection_state_disconnected = 0,
|
|
384
|
+
connection_state_connected = 1,
|
|
385
|
+
connection_state_recovering = 3,
|
|
386
|
+
connection_state_failed_to_recover = 4,
|
|
387
|
+
connection_state_recovered = 5
|
|
388
|
+
} vx_connection_state;
|
|
389
|
+
|
|
390
|
+
typedef struct vx_message_base {
|
|
391
|
+
vx_message_type type;
|
|
392
|
+
VX_SDK_HANDLE sdk_handle;
|
|
393
|
+
unsigned long long create_time_ms;
|
|
394
|
+
unsigned long long last_step_ms;
|
|
395
|
+
} vx_message_base_t;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* The set of requests that can be issued.
|
|
399
|
+
*/
|
|
400
|
+
typedef enum {
|
|
401
|
+
req_none = 0,
|
|
402
|
+
req_connector_create = 1,
|
|
403
|
+
req_connector_initiate_shutdown = 2,
|
|
404
|
+
req_account_login = 3,
|
|
405
|
+
req_account_logout = 4,
|
|
406
|
+
req_account_set_login_properties = 5,
|
|
407
|
+
req_sessiongroup_create = 6,
|
|
408
|
+
req_sessiongroup_terminate = 7,
|
|
409
|
+
req_sessiongroup_add_session = 8,
|
|
410
|
+
req_sessiongroup_remove_session = 9,
|
|
411
|
+
req_sessiongroup_set_focus = 10,
|
|
412
|
+
req_sessiongroup_unset_focus = 11,
|
|
413
|
+
req_sessiongroup_reset_focus = 12,
|
|
414
|
+
req_sessiongroup_set_tx_session = 13,
|
|
415
|
+
req_sessiongroup_set_tx_all_sessions = 14,
|
|
416
|
+
req_sessiongroup_set_tx_no_session = 15,
|
|
417
|
+
req_session_create = 16, /**< Do not use. Instead, use req_sessiongroup_add_session */
|
|
418
|
+
req_session_media_connect = 18,
|
|
419
|
+
req_session_media_disconnect = 19,
|
|
420
|
+
req_session_terminate = 21,
|
|
421
|
+
req_session_mute_local_speaker = 22,
|
|
422
|
+
req_session_set_local_speaker_volume = 23,
|
|
423
|
+
req_session_set_local_render_volume = 24,
|
|
424
|
+
req_session_channel_invite_user = 25,
|
|
425
|
+
req_session_set_participant_volume_for_me = 26,
|
|
426
|
+
req_session_set_participant_mute_for_me = 27,
|
|
427
|
+
req_session_set_3d_position = 28,
|
|
428
|
+
req_session_set_voice_font = 29,
|
|
429
|
+
req_account_channel_add_acl = 53,
|
|
430
|
+
req_account_channel_remove_acl = 54,
|
|
431
|
+
req_account_channel_get_acl = 55,
|
|
432
|
+
req_channel_mute_user = 56,
|
|
433
|
+
req_channel_ban_user = 57,
|
|
434
|
+
req_channel_get_banned_users = 58,
|
|
435
|
+
req_channel_kick_user = 59,
|
|
436
|
+
req_channel_mute_all_users = 60,
|
|
437
|
+
req_connector_mute_local_mic = 61,
|
|
438
|
+
req_connector_mute_local_speaker = 62,
|
|
439
|
+
req_connector_set_local_mic_volume = 63,
|
|
440
|
+
req_connector_set_local_speaker_volume = 64,
|
|
441
|
+
req_connector_get_local_audio_info = 65,
|
|
442
|
+
req_account_buddy_set = 67,
|
|
443
|
+
req_account_buddy_delete = 68,
|
|
444
|
+
req_account_list_buddies_and_groups = 71,
|
|
445
|
+
req_session_send_message = 72,
|
|
446
|
+
req_account_set_presence = 73,
|
|
447
|
+
req_account_send_subscription_reply = 74,
|
|
448
|
+
req_session_send_notification = 75,
|
|
449
|
+
req_account_create_block_rule = 76,
|
|
450
|
+
req_account_delete_block_rule = 77,
|
|
451
|
+
req_account_list_block_rules = 78,
|
|
452
|
+
req_account_create_auto_accept_rule = 79,
|
|
453
|
+
req_account_delete_auto_accept_rule = 80,
|
|
454
|
+
req_account_list_auto_accept_rules = 81,
|
|
455
|
+
req_account_update_account = 82, /**< Deprecated */
|
|
456
|
+
req_account_get_account = 83, /**< Deprecated */
|
|
457
|
+
req_account_send_sms = 84,
|
|
458
|
+
req_aux_connectivity_info = 86,
|
|
459
|
+
req_aux_get_render_devices = 87,
|
|
460
|
+
req_aux_get_capture_devices = 88,
|
|
461
|
+
req_aux_set_render_device = 89,
|
|
462
|
+
req_aux_set_capture_device = 90,
|
|
463
|
+
req_aux_get_mic_level = 91,
|
|
464
|
+
req_aux_get_speaker_level = 92,
|
|
465
|
+
req_aux_set_mic_level = 93,
|
|
466
|
+
req_aux_set_speaker_level = 94,
|
|
467
|
+
req_aux_render_audio_start = 95,
|
|
468
|
+
req_aux_render_audio_stop = 96,
|
|
469
|
+
req_aux_capture_audio_start = 97,
|
|
470
|
+
req_aux_capture_audio_stop = 98,
|
|
471
|
+
req_aux_global_monitor_keyboard_mouse = 99,
|
|
472
|
+
req_aux_set_idle_timeout = 100,
|
|
473
|
+
req_aux_create_account = 101,
|
|
474
|
+
req_aux_reactivate_account = 102,
|
|
475
|
+
req_aux_deactivate_account = 103,
|
|
476
|
+
req_account_post_crash_dump = 104,
|
|
477
|
+
req_aux_reset_password = 105,
|
|
478
|
+
req_sessiongroup_set_session_3d_position = 106,
|
|
479
|
+
req_account_get_session_fonts = 107,
|
|
480
|
+
req_account_get_template_fonts = 108,
|
|
481
|
+
req_aux_start_buffer_capture = 109,
|
|
482
|
+
req_aux_play_audio_buffer = 110,
|
|
483
|
+
req_sessiongroup_control_recording = 111,
|
|
484
|
+
req_sessiongroup_control_playback = 112,
|
|
485
|
+
req_sessiongroup_set_playback_options = 113,
|
|
486
|
+
req_session_text_connect = 114,
|
|
487
|
+
req_session_text_disconnect = 115,
|
|
488
|
+
req_channel_set_lock_mode = 116,
|
|
489
|
+
req_aux_render_audio_modify = 117,
|
|
490
|
+
req_session_send_dtmf = 118,
|
|
491
|
+
req_aux_set_vad_properties = 120,
|
|
492
|
+
req_aux_get_vad_properties = 121,
|
|
493
|
+
req_sessiongroup_control_audio_injection = 124,
|
|
494
|
+
req_account_channel_change_owner = 125, /**< Not yet implemented (3030) */
|
|
495
|
+
req_account_send_user_app_data = 128, /**< Not yet implemented (3030) */
|
|
496
|
+
req_aux_diagnostic_state_dump = 129,
|
|
497
|
+
req_account_web_call = 130,
|
|
498
|
+
req_account_anonymous_login = 131,
|
|
499
|
+
req_account_authtoken_login = 132,
|
|
500
|
+
req_sessiongroup_get_stats = 133,
|
|
501
|
+
req_account_send_message = 134,
|
|
502
|
+
req_aux_notify_application_state_change = 135,
|
|
503
|
+
req_account_control_communications = 136,
|
|
504
|
+
req_session_archive_query = 137,
|
|
505
|
+
req_account_archive_query = 138,
|
|
506
|
+
req_session_transcription_control = 139,
|
|
507
|
+
req_aux_get_derumbler_properties = 140,
|
|
508
|
+
req_aux_set_derumbler_properties = 141,
|
|
509
|
+
req_session_chat_history_query = 142,
|
|
510
|
+
req_account_chat_history_query = 143,
|
|
511
|
+
req_account_chat_history_get_last_read = 144,
|
|
512
|
+
req_session_edit_message = 145,
|
|
513
|
+
req_account_edit_message = 146,
|
|
514
|
+
req_session_delete_message = 147,
|
|
515
|
+
req_account_delete_message = 148,
|
|
516
|
+
req_account_get_conversations = 149,
|
|
517
|
+
req_account_chat_history_set_marker = 150,
|
|
518
|
+
req_account_safe_voice_update_consent = 151,
|
|
519
|
+
req_account_safe_voice_get_consent = 152,
|
|
520
|
+
req_max = req_account_safe_voice_get_consent + 1
|
|
521
|
+
} vx_request_type;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Response types that are reported back to the calling app.
|
|
525
|
+
*/
|
|
526
|
+
typedef enum {
|
|
527
|
+
resp_none = 0,
|
|
528
|
+
resp_connector_create = 1,
|
|
529
|
+
resp_connector_initiate_shutdown = 2,
|
|
530
|
+
resp_account_login = 3,
|
|
531
|
+
resp_account_logout = 4,
|
|
532
|
+
resp_account_set_login_properties = 5,
|
|
533
|
+
resp_sessiongroup_create = 6,
|
|
534
|
+
resp_sessiongroup_terminate = 7,
|
|
535
|
+
resp_sessiongroup_add_session = 8,
|
|
536
|
+
resp_sessiongroup_remove_session = 9,
|
|
537
|
+
resp_sessiongroup_set_focus = 10,
|
|
538
|
+
resp_sessiongroup_unset_focus = 11,
|
|
539
|
+
resp_sessiongroup_reset_focus = 12,
|
|
540
|
+
resp_sessiongroup_set_tx_session = 13,
|
|
541
|
+
resp_sessiongroup_set_tx_all_sessions = 14,
|
|
542
|
+
resp_sessiongroup_set_tx_no_session = 15,
|
|
543
|
+
resp_session_create = 16, /**< Do not use. */
|
|
544
|
+
resp_session_media_connect = 18,
|
|
545
|
+
resp_session_media_disconnect = 19,
|
|
546
|
+
resp_session_terminate = 21,
|
|
547
|
+
resp_session_mute_local_speaker = 22,
|
|
548
|
+
resp_session_set_local_speaker_volume = 23,
|
|
549
|
+
resp_session_set_local_render_volume = 24,
|
|
550
|
+
resp_session_channel_invite_user = 25,
|
|
551
|
+
resp_session_set_participant_volume_for_me = 26,
|
|
552
|
+
resp_session_set_participant_mute_for_me = 27,
|
|
553
|
+
resp_session_set_3d_position = 28,
|
|
554
|
+
resp_session_set_voice_font = 29,
|
|
555
|
+
resp_account_channel_get_list = 33,
|
|
556
|
+
resp_account_channel_add_acl = 53,
|
|
557
|
+
resp_account_channel_remove_acl = 54,
|
|
558
|
+
resp_account_channel_get_acl = 55,
|
|
559
|
+
resp_channel_mute_user = 56,
|
|
560
|
+
resp_channel_ban_user = 57,
|
|
561
|
+
resp_channel_get_banned_users = 58,
|
|
562
|
+
resp_channel_kick_user = 59,
|
|
563
|
+
resp_channel_mute_all_users = 60,
|
|
564
|
+
resp_connector_mute_local_mic = 61,
|
|
565
|
+
resp_connector_mute_local_speaker = 62,
|
|
566
|
+
resp_connector_set_local_mic_volume = 63,
|
|
567
|
+
resp_connector_set_local_speaker_volume = 64,
|
|
568
|
+
resp_connector_get_local_audio_info = 65,
|
|
569
|
+
resp_account_buddy_set = 67,
|
|
570
|
+
resp_account_buddy_delete = 68,
|
|
571
|
+
resp_account_list_buddies_and_groups = 71,
|
|
572
|
+
resp_session_send_message = 72,
|
|
573
|
+
resp_account_set_presence = 73,
|
|
574
|
+
resp_account_send_subscription_reply = 74,
|
|
575
|
+
resp_session_send_notification = 75,
|
|
576
|
+
resp_account_create_block_rule = 76,
|
|
577
|
+
resp_account_delete_block_rule = 77,
|
|
578
|
+
resp_account_list_block_rules = 78,
|
|
579
|
+
resp_account_create_auto_accept_rule = 79,
|
|
580
|
+
resp_account_delete_auto_accept_rule = 80,
|
|
581
|
+
resp_account_list_auto_accept_rules = 81,
|
|
582
|
+
resp_account_update_account = 82, /**< Deprecated */
|
|
583
|
+
resp_account_get_account = 83, /**< Deprecated */
|
|
584
|
+
resp_account_send_sms = 84,
|
|
585
|
+
resp_aux_connectivity_info = 86,
|
|
586
|
+
resp_aux_get_render_devices = 87,
|
|
587
|
+
resp_aux_get_capture_devices = 88,
|
|
588
|
+
resp_aux_set_render_device = 89,
|
|
589
|
+
resp_aux_set_capture_device = 90,
|
|
590
|
+
resp_aux_get_mic_level = 91,
|
|
591
|
+
resp_aux_get_speaker_level = 92,
|
|
592
|
+
resp_aux_set_mic_level = 93,
|
|
593
|
+
resp_aux_set_speaker_level = 94,
|
|
594
|
+
resp_aux_render_audio_start = 95,
|
|
595
|
+
resp_aux_render_audio_stop = 96,
|
|
596
|
+
resp_aux_capture_audio_start = 97,
|
|
597
|
+
resp_aux_capture_audio_stop = 98,
|
|
598
|
+
resp_aux_global_monitor_keyboard_mouse = 99,
|
|
599
|
+
resp_aux_set_idle_timeout = 100,
|
|
600
|
+
resp_aux_create_account = 101,
|
|
601
|
+
resp_aux_reactivate_account = 102,
|
|
602
|
+
resp_aux_deactivate_account = 103,
|
|
603
|
+
resp_account_post_crash_dump = 104,
|
|
604
|
+
resp_aux_reset_password = 105,
|
|
605
|
+
resp_sessiongroup_set_session_3d_position = 106,
|
|
606
|
+
resp_account_get_session_fonts = 107,
|
|
607
|
+
resp_account_get_template_fonts = 108,
|
|
608
|
+
resp_aux_start_buffer_capture = 109,
|
|
609
|
+
resp_aux_play_audio_buffer = 110,
|
|
610
|
+
resp_sessiongroup_control_recording = 111,
|
|
611
|
+
resp_sessiongroup_control_playback = 112,
|
|
612
|
+
resp_sessiongroup_set_playback_options = 113,
|
|
613
|
+
resp_session_text_connect = 114,
|
|
614
|
+
resp_session_text_disconnect = 115,
|
|
615
|
+
resp_channel_set_lock_mode = 116,
|
|
616
|
+
resp_aux_render_audio_modify = 117,
|
|
617
|
+
resp_session_send_dtmf = 118,
|
|
618
|
+
resp_aux_set_vad_properties = 120,
|
|
619
|
+
resp_aux_get_vad_properties = 121,
|
|
620
|
+
resp_sessiongroup_control_audio_injection = 124,
|
|
621
|
+
resp_account_channel_change_owner = 125, /**< Not yet implemented (3030) */
|
|
622
|
+
resp_account_send_user_app_data = 128, /**< Not yet implemented (3030) */
|
|
623
|
+
resp_aux_diagnostic_state_dump = 129,
|
|
624
|
+
resp_account_web_call = 130,
|
|
625
|
+
resp_account_anonymous_login = 131,
|
|
626
|
+
resp_account_authtoken_login = 132,
|
|
627
|
+
resp_sessiongroup_get_stats = 133,
|
|
628
|
+
resp_account_send_message = 134,
|
|
629
|
+
resp_aux_notify_application_state_change = 135,
|
|
630
|
+
resp_account_control_communications = 136,
|
|
631
|
+
resp_session_archive_query = 137,
|
|
632
|
+
resp_account_archive_query = 138,
|
|
633
|
+
resp_session_transcription_control = 139,
|
|
634
|
+
resp_aux_get_derumbler_properties = 140,
|
|
635
|
+
resp_aux_set_derumbler_properties = 141,
|
|
636
|
+
resp_session_chat_history_query = 142,
|
|
637
|
+
resp_account_chat_history_query = 143,
|
|
638
|
+
resp_account_chat_history_get_last_read = 144,
|
|
639
|
+
resp_session_edit_message = 145,
|
|
640
|
+
resp_account_edit_message = 146,
|
|
641
|
+
resp_session_delete_message = 147,
|
|
642
|
+
resp_account_delete_message = 148,
|
|
643
|
+
resp_account_get_conversations = 149,
|
|
644
|
+
resp_account_chat_history_set_marker = 150,
|
|
645
|
+
resp_account_safe_voice_update_consent = 151,
|
|
646
|
+
resp_account_safe_voice_get_consent = 152,
|
|
647
|
+
resp_max = resp_account_safe_voice_get_consent + 1
|
|
648
|
+
} vx_response_type;
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Event types that are reported back to the calling app.
|
|
652
|
+
*/
|
|
653
|
+
typedef enum {
|
|
654
|
+
evt_none = 0,
|
|
655
|
+
evt_account_login_state_change = 2,
|
|
656
|
+
evt_buddy_presence = 7,
|
|
657
|
+
evt_subscription = 8,
|
|
658
|
+
evt_session_notification = 9,
|
|
659
|
+
evt_message = 10,
|
|
660
|
+
evt_aux_audio_properties = 11,
|
|
661
|
+
evt_buddy_changed = 15,
|
|
662
|
+
evt_buddy_group_changed = 16,
|
|
663
|
+
evt_buddy_and_group_list_changed = 17,
|
|
664
|
+
evt_keyboard_mouse = 18,
|
|
665
|
+
evt_idle_state_changed = 19,
|
|
666
|
+
evt_media_stream_updated = 20,
|
|
667
|
+
evt_text_stream_updated = 21,
|
|
668
|
+
evt_sessiongroup_added = 22,
|
|
669
|
+
evt_sessiongroup_removed = 23,
|
|
670
|
+
evt_session_added = 24,
|
|
671
|
+
evt_session_removed = 25,
|
|
672
|
+
evt_participant_added = 26,
|
|
673
|
+
evt_participant_removed = 27,
|
|
674
|
+
evt_participant_updated = 28,
|
|
675
|
+
evt_sessiongroup_playback_frame_played = 30,
|
|
676
|
+
evt_session_updated = 31,
|
|
677
|
+
evt_sessiongroup_updated = 32,
|
|
678
|
+
evt_media_completion = 33,
|
|
679
|
+
evt_server_app_data = 35,
|
|
680
|
+
evt_user_app_data = 36,
|
|
681
|
+
evt_network_message = 38,
|
|
682
|
+
evt_voice_service_connection_state_changed = 39,
|
|
683
|
+
evt_publication_state_changed = 40,
|
|
684
|
+
evt_audio_device_hot_swap = 41,
|
|
685
|
+
evt_user_to_user_message = 42,
|
|
686
|
+
evt_session_archive_message = 43,
|
|
687
|
+
evt_session_archive_query_end = 44,
|
|
688
|
+
evt_account_archive_message = 45,
|
|
689
|
+
evt_account_archive_query_end = 46,
|
|
690
|
+
evt_account_send_message_failed = 47,
|
|
691
|
+
evt_transcribed_message = 48,
|
|
692
|
+
evt_tts_injection_started = 49,
|
|
693
|
+
evt_tts_injection_ended = 50,
|
|
694
|
+
evt_tts_injection_failed = 51,
|
|
695
|
+
evt_stt_failed = 52,
|
|
696
|
+
evt_connection_state_changed = 53,
|
|
697
|
+
evt_presence_updated = 54,
|
|
698
|
+
evt_session_edit_message = 55,
|
|
699
|
+
evt_account_edit_message = 56,
|
|
700
|
+
evt_session_delete_message = 57,
|
|
701
|
+
evt_account_delete_message = 58,
|
|
702
|
+
evt_max = evt_account_delete_message + 1
|
|
703
|
+
} vx_event_type;
|
|
704
|
+
|
|
705
|
+
typedef struct vx_req_base {
|
|
706
|
+
vx_message_base_t message;
|
|
707
|
+
vx_request_type type;
|
|
708
|
+
VX_COOKIE cookie;
|
|
709
|
+
void *vcookie;
|
|
710
|
+
} vx_req_base_t;
|
|
711
|
+
|
|
712
|
+
typedef struct vx_resp_base {
|
|
713
|
+
vx_message_base_t message;
|
|
714
|
+
vx_response_type type;
|
|
715
|
+
int return_code;
|
|
716
|
+
int status_code;
|
|
717
|
+
char *status_string;
|
|
718
|
+
vx_req_base_t *request;
|
|
719
|
+
char *extended_status_info;
|
|
720
|
+
} vx_resp_base_t;
|
|
721
|
+
|
|
722
|
+
typedef struct vx_evt_base {
|
|
723
|
+
vx_message_base_t message;
|
|
724
|
+
vx_event_type type;
|
|
725
|
+
char *extended_status_info;
|
|
726
|
+
} vx_evt_base_t;
|
|
727
|
+
|
|
728
|
+
typedef enum {
|
|
729
|
+
ND_E_NO_ERROR = 0,
|
|
730
|
+
ND_E_TEST_NOT_RUN = 1,
|
|
731
|
+
ND_E_NO_INTERFACE = 2,
|
|
732
|
+
ND_E_NO_INTERFACE_WITH_GATEWAY = 3,
|
|
733
|
+
ND_E_NO_INTERFACE_WITH_ROUTE = 4,
|
|
734
|
+
ND_E_TIMEOUT = 5,
|
|
735
|
+
ND_E_CANT_ICMP = 6,
|
|
736
|
+
ND_E_CANT_RESOLVE_VIVOX_UDP_SERVER = 7,
|
|
737
|
+
ND_E_CANT_RESOLVE_ROOT_DNS_SERVER = 8,
|
|
738
|
+
ND_E_CANT_CONVERT_LOCAL_IP_ADDRESS = 9,
|
|
739
|
+
ND_E_CANT_CONTACT_STUN_SERVER_ON_UDP_PORT_3478 = 10,
|
|
740
|
+
ND_E_CANT_CREATE_TCP_SOCKET = 11,
|
|
741
|
+
ND_E_CANT_LOAD_ICMP_LIBRARY = 12,
|
|
742
|
+
ND_E_CANT_FIND_SENDECHO2_PROCADDR = 13,
|
|
743
|
+
ND_E_CANT_CONNECT_TO_ECHO_SERVER = 14,
|
|
744
|
+
ND_E_ECHO_SERVER_LOGIN_SEND_FAILED = 15,
|
|
745
|
+
ND_E_ECHO_SERVER_LOGIN_RECV_FAILED = 16,
|
|
746
|
+
ND_E_ECHO_SERVER_LOGIN_RESPONSE_MISSING_STATUS = 17,
|
|
747
|
+
ND_E_ECHO_SERVER_LOGIN_RESPONSE_FAILED_STATUS = 18,
|
|
748
|
+
ND_E_ECHO_SERVER_LOGIN_RESPONSE_MISSING_SESSIONID = 19,
|
|
749
|
+
ND_E_ECHO_SERVER_LOGIN_RESPONSE_MISSING_SIPPORT = 20,
|
|
750
|
+
ND_E_ECHO_SERVER_LOGIN_RESPONSE_MISSING_AUDIORTP = 21,
|
|
751
|
+
ND_E_ECHO_SERVER_LOGIN_RESPONSE_MISSING_AUDIORTCP = 22,
|
|
752
|
+
ND_E_ECHO_SERVER_LOGIN_RESPONSE_MISSING_VIDEORTP = 23,
|
|
753
|
+
ND_E_ECHO_SERVER_LOGIN_RESPONSE_MISSING_VIDEORTCP = 24,
|
|
754
|
+
ND_E_ECHO_SERVER_CANT_ALLOCATE_SIP_SOCKET = 25,
|
|
755
|
+
ND_E_ECHO_SERVER_CANT_ALLOCATE_MEDIA_SOCKET = 26,
|
|
756
|
+
ND_E_ECHO_SERVER_SIP_UDP_SEND_FAILED = 27,
|
|
757
|
+
ND_E_ECHO_SERVER_SIP_UDP_RECV_FAILED = 28,
|
|
758
|
+
ND_E_ECHO_SERVER_SIP_TCP_SEND_FAILED = 29,
|
|
759
|
+
ND_E_ECHO_SERVER_SIP_TCP_RECV_FAILED = 30,
|
|
760
|
+
ND_E_ECHO_SERVER_SIP_NO_UDP_OR_TCP = 31,
|
|
761
|
+
ND_E_ECHO_SERVER_SIP_NO_UDP = 32,
|
|
762
|
+
ND_E_ECHO_SERVER_SIP_NO_TCP = 33,
|
|
763
|
+
ND_E_ECHO_SERVER_SIP_MALFORMED_TCP_PACKET = 34,
|
|
764
|
+
ND_E_ECHO_SERVER_SIP_UDP_DIFFERENT_LENGTH = 35,
|
|
765
|
+
ND_E_ECHO_SERVER_SIP_UDP_DATA_DIFFERENT = 36,
|
|
766
|
+
ND_E_ECHO_SERVER_SIP_TCP_PACKETS_DIFFERENT = 37,
|
|
767
|
+
ND_E_ECHO_SERVER_SIP_TCP_PACKETS_DIFFERENT_SIZE = 38,
|
|
768
|
+
ND_E_ECHO_SERVER_LOGIN_RECV_FAILED_TIMEOUT = 39,
|
|
769
|
+
ND_E_ECHO_SERVER_TCP_SET_ASYNC_FAILED = 40,
|
|
770
|
+
ND_E_ECHO_SERVER_UDP_SET_ASYNC_FAILED = 41,
|
|
771
|
+
ND_E_ECHO_SERVER_CANT_RESOLVE_NAME = 42
|
|
772
|
+
} ND_ERROR;
|
|
773
|
+
|
|
774
|
+
typedef enum {
|
|
775
|
+
ND_TEST_LOCATE_INTERFACE = 0,
|
|
776
|
+
ND_TEST_PING_GATEWAY = 1,
|
|
777
|
+
ND_TEST_DNS = 2,
|
|
778
|
+
ND_TEST_STUN = 3,
|
|
779
|
+
ND_TEST_ECHO = 4,
|
|
780
|
+
ND_TEST_ECHO_SIP_FIRST_PORT = 5,
|
|
781
|
+
ND_TEST_ECHO_SIP_FIRST_PORT_INVITE_REQUEST = 6,
|
|
782
|
+
ND_TEST_ECHO_SIP_FIRST_PORT_INVITE_RESPONSE = 7,
|
|
783
|
+
ND_TEST_ECHO_SIP_FIRST_PORT_REGISTER_REQUEST = 8,
|
|
784
|
+
ND_TEST_ECHO_SIP_FIRST_PORT_REGISTER_RESPONSE = 9,
|
|
785
|
+
ND_TEST_ECHO_SIP_SECOND_PORT = 10,
|
|
786
|
+
ND_TEST_ECHO_SIP_SECOND_PORT_INVITE_REQUEST = 11,
|
|
787
|
+
ND_TEST_ECHO_SIP_SECOND_PORT_INVITE_RESPONSE = 12,
|
|
788
|
+
ND_TEST_ECHO_SIP_SECOND_PORT_REGISTER_REQUEST = 13,
|
|
789
|
+
ND_TEST_ECHO_SIP_SECOND_PORT_REGISTER_RESPONSE = 14,
|
|
790
|
+
ND_TEST_ECHO_MEDIA = 15,
|
|
791
|
+
ND_TEST_ECHO_MEDIA_LARGE_PACKET = 16
|
|
792
|
+
} ND_TEST_TYPE;
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Determine how incoming calls are handled.
|
|
796
|
+
* Set at login.
|
|
797
|
+
*/
|
|
798
|
+
typedef enum {
|
|
799
|
+
/**
|
|
800
|
+
* Not valid for use.
|
|
801
|
+
*/
|
|
802
|
+
mode_none = 0,
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* \deprecated This is deprecated and should not be used.
|
|
806
|
+
* The incoming call is automatically connected if a call is not already established.
|
|
807
|
+
* @deprecated
|
|
808
|
+
*/
|
|
809
|
+
mode_auto_answer = 1,
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Requires the client to explicitly answer the incoming call.
|
|
813
|
+
*/
|
|
814
|
+
mode_verify_answer = 2,
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* The incoming call is automatically answered with a 486 busy.
|
|
818
|
+
*/
|
|
819
|
+
mode_busy_answer = 3
|
|
820
|
+
} vx_session_answer_mode;
|
|
821
|
+
|
|
822
|
+
typedef enum {
|
|
823
|
+
mode_auto_accept = 0,
|
|
824
|
+
mode_auto_add = 1,
|
|
825
|
+
mode_block = 2,
|
|
826
|
+
mode_hide = 3,
|
|
827
|
+
mode_application = 4
|
|
828
|
+
} vx_buddy_management_mode;
|
|
829
|
+
|
|
830
|
+
typedef enum {
|
|
831
|
+
rule_none = 0,
|
|
832
|
+
rule_allow = 1,
|
|
833
|
+
rule_block = 2,
|
|
834
|
+
rule_hide = 3
|
|
835
|
+
} vx_rule_type;
|
|
836
|
+
|
|
837
|
+
typedef enum {
|
|
838
|
+
type_none = 0,
|
|
839
|
+
type_root = 1,
|
|
840
|
+
type_user = 2
|
|
841
|
+
} vx_font_type;
|
|
842
|
+
|
|
843
|
+
typedef enum {
|
|
844
|
+
status_none = 0,
|
|
845
|
+
status_free = 1,
|
|
846
|
+
status_not_free = 2
|
|
847
|
+
} vx_font_status;
|
|
848
|
+
|
|
849
|
+
typedef enum {
|
|
850
|
+
subscription_presence = 0
|
|
851
|
+
} vx_subscription_type;
|
|
852
|
+
|
|
853
|
+
typedef enum {
|
|
854
|
+
notification_not_typing = 0,
|
|
855
|
+
notification_typing = 1,
|
|
856
|
+
notification_hand_lowered = 2,
|
|
857
|
+
notification_hand_raised = 3,
|
|
858
|
+
notification_min = notification_not_typing,
|
|
859
|
+
notification_max = notification_hand_raised
|
|
860
|
+
} vx_notification_type;
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
*/
|
|
864
|
+
typedef enum {
|
|
865
|
+
dtmf_0 = 0,
|
|
866
|
+
dtmf_1 = 1,
|
|
867
|
+
dtmf_2 = 2,
|
|
868
|
+
dtmf_3 = 3,
|
|
869
|
+
dtmf_4 = 4,
|
|
870
|
+
dtmf_5 = 5,
|
|
871
|
+
dtmf_6 = 6,
|
|
872
|
+
dtmf_7 = 7,
|
|
873
|
+
dtmf_8 = 8,
|
|
874
|
+
dtmf_9 = 9,
|
|
875
|
+
dtmf_pound = 10,
|
|
876
|
+
dtmf_star = 11,
|
|
877
|
+
dtmf_A = 12,
|
|
878
|
+
dtmf_B = 13,
|
|
879
|
+
dtmf_C = 14,
|
|
880
|
+
dtmf_D = 15,
|
|
881
|
+
dtmf_max = dtmf_D
|
|
882
|
+
} vx_dtmf_type;
|
|
883
|
+
|
|
884
|
+
typedef enum {
|
|
885
|
+
text_mode_disabled = 0,
|
|
886
|
+
text_mode_enabled = 1
|
|
887
|
+
} vx_text_mode;
|
|
888
|
+
|
|
889
|
+
typedef enum {
|
|
890
|
+
channel_unlock = 0,
|
|
891
|
+
channel_lock = 1
|
|
892
|
+
} vx_channel_lock_mode;
|
|
893
|
+
|
|
894
|
+
typedef enum {
|
|
895
|
+
mute_scope_all = 0,
|
|
896
|
+
mute_scope_audio = 1,
|
|
897
|
+
mute_scope_text = 2
|
|
898
|
+
} vx_mute_scope;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Hold a recorded audio frame.
|
|
902
|
+
*/
|
|
903
|
+
typedef enum {
|
|
904
|
+
VX_RECORDING_FRAME_TYPE_DELTA = 0,
|
|
905
|
+
VX_RECORDING_FRAME_TYPE_CONTROL = 1
|
|
906
|
+
} vx_recording_frame_type_t;
|
|
907
|
+
|
|
908
|
+
typedef enum {
|
|
909
|
+
op_none = 0,
|
|
910
|
+
op_safeupdate = 1,
|
|
911
|
+
op_delete = 2
|
|
912
|
+
} vx_audiosource_operation;
|
|
913
|
+
|
|
914
|
+
typedef enum {
|
|
915
|
+
aux_audio_properties_none = 0
|
|
916
|
+
} vx_aux_audio_properties_state;
|
|
917
|
+
|
|
918
|
+
typedef enum {
|
|
919
|
+
login_state_logged_out = 0,
|
|
920
|
+
login_state_logged_in = 1,
|
|
921
|
+
login_state_logging_in = 2,
|
|
922
|
+
login_state_logging_out = 3,
|
|
923
|
+
login_state_resetting = 4,
|
|
924
|
+
login_state_error = 100
|
|
925
|
+
} vx_login_state_change_state;
|
|
926
|
+
|
|
927
|
+
typedef enum {
|
|
928
|
+
publication_state_success = 0,
|
|
929
|
+
publication_state_transient_error = 1,
|
|
930
|
+
publication_state_permanent_error = 2
|
|
931
|
+
} vx_publication_state_change_state;
|
|
932
|
+
|
|
933
|
+
typedef enum {
|
|
934
|
+
buddy_presence_unknown = 0, /**< OBSOLETE */
|
|
935
|
+
buddy_presence_pending = 1, /**< OBSOLETE */
|
|
936
|
+
buddy_presence_online = 2,
|
|
937
|
+
buddy_presence_busy = 3,
|
|
938
|
+
buddy_presence_brb = 4,
|
|
939
|
+
buddy_presence_away = 5,
|
|
940
|
+
buddy_presence_onthephone = 6,
|
|
941
|
+
buddy_presence_outtolunch = 7,
|
|
942
|
+
buddy_presence_custom = 8, /**< OBSOLETE */
|
|
943
|
+
buddy_presence_online_slc = 9, /**< OBSOLETE */
|
|
944
|
+
buddy_presence_closed = 0, /**< OBSOLETE */
|
|
945
|
+
buddy_presence_offline = 0,
|
|
946
|
+
buddy_presence_chat = 10,
|
|
947
|
+
buddy_presence_extended_away = 11,
|
|
948
|
+
buddy_presence_min = buddy_presence_unknown,
|
|
949
|
+
buddy_presence_max = buddy_presence_extended_away
|
|
950
|
+
} vx_buddy_presence_state;
|
|
951
|
+
|
|
952
|
+
typedef enum {
|
|
953
|
+
presence_online = 0,
|
|
954
|
+
presence_busy = 1,
|
|
955
|
+
presence_brb = 2,
|
|
956
|
+
presence_away = 3,
|
|
957
|
+
presence_onthephone = 4,
|
|
958
|
+
presence_offline = 5,
|
|
959
|
+
presence_chat = 6,
|
|
960
|
+
presence_extended_away = 7,
|
|
961
|
+
presence_min = presence_online,
|
|
962
|
+
presence_max = presence_extended_away
|
|
963
|
+
} vx_presence_state;
|
|
964
|
+
|
|
965
|
+
typedef enum {
|
|
966
|
+
session_notification_none = 0
|
|
967
|
+
} vx_session_notification_state;
|
|
968
|
+
|
|
969
|
+
typedef enum {
|
|
970
|
+
message_none = 0
|
|
971
|
+
} vx_message_state;
|
|
972
|
+
|
|
973
|
+
typedef enum {
|
|
974
|
+
// NB: Keep in sync with enum TextState in sessionproperties.h
|
|
975
|
+
session_text_disconnected = 0,
|
|
976
|
+
session_text_connected = 1,
|
|
977
|
+
session_text_connecting = 2,
|
|
978
|
+
session_text_disconnecting = 3
|
|
979
|
+
} vx_session_text_state;
|
|
980
|
+
|
|
981
|
+
typedef enum {
|
|
982
|
+
// NB: Keep in sync with enum MediaState in sessionproperties.h
|
|
983
|
+
// NB: MediaState has the additional state MediaStateIncoming, which is mapped to session_media_ringing or session_media_disconnected in different places.
|
|
984
|
+
session_media_disconnected = 1,
|
|
985
|
+
session_media_connected = 2,
|
|
986
|
+
session_media_ringing = 3,
|
|
987
|
+
session_media_connecting = 6,
|
|
988
|
+
session_media_disconnecting = 7
|
|
989
|
+
} vx_session_media_state;
|
|
990
|
+
|
|
991
|
+
typedef enum {
|
|
992
|
+
participant_user = 0,
|
|
993
|
+
part_user = participant_user, // For backward compatibility.
|
|
994
|
+
|
|
995
|
+
participant_moderator = 1,
|
|
996
|
+
part_moderator = participant_moderator, // For backward compatibility.
|
|
997
|
+
|
|
998
|
+
participant_owner = 2,
|
|
999
|
+
part_focus = participant_owner // For backward compatibility.
|
|
1000
|
+
} vx_participant_type;
|
|
1001
|
+
|
|
1002
|
+
typedef enum {
|
|
1003
|
+
orientation_default = 0,
|
|
1004
|
+
orientation_legacy = 1,
|
|
1005
|
+
orientation_vivox = 2
|
|
1006
|
+
} orientation_type;
|
|
1007
|
+
|
|
1008
|
+
typedef enum {
|
|
1009
|
+
media_completion_type_none = 0,
|
|
1010
|
+
aux_buffer_audio_capture = 1,
|
|
1011
|
+
aux_buffer_audio_render = 2,
|
|
1012
|
+
sessiongroup_audio_injection = 3
|
|
1013
|
+
} vx_media_completion_type;
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Participant media flags.
|
|
1017
|
+
*/
|
|
1018
|
+
#define VX_MEDIA_FLAGS_AUDIO 0x1
|
|
1019
|
+
#define VX_MEDIA_FLAGS_TEXT 0x2
|
|
1020
|
+
|
|
1021
|
+
// Buddy for state dump.
|
|
1022
|
+
typedef struct vx_state_buddy_contact {
|
|
1023
|
+
vx_buddy_presence_state presence;
|
|
1024
|
+
char *display_name;
|
|
1025
|
+
char *application;
|
|
1026
|
+
char *custom_message;
|
|
1027
|
+
char *contact;
|
|
1028
|
+
char *priority;
|
|
1029
|
+
char *id;
|
|
1030
|
+
} vx_state_buddy_contact_t;
|
|
1031
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1032
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_contact_create(vx_state_buddy_contact_t **contact);
|
|
1033
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_contact_free(vx_state_buddy_contact_t *contact);
|
|
1034
|
+
#endif
|
|
1035
|
+
typedef vx_state_buddy_contact_t *vx_state_buddy_contact_ref_t;
|
|
1036
|
+
typedef vx_state_buddy_contact_ref_t *vx_state_buddy_contact_list_t;
|
|
1037
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1038
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_contact_list_create(int size, vx_state_buddy_contact_list_t *list_out);
|
|
1039
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_contact_list_free(vx_state_buddy_contact_t **list, int size);
|
|
1040
|
+
#endif
|
|
1041
|
+
|
|
1042
|
+
// Buddy for state dump.
|
|
1043
|
+
typedef struct vx_state_buddy {
|
|
1044
|
+
char *buddy_uri;
|
|
1045
|
+
char *display_name;
|
|
1046
|
+
int parent_group_id;
|
|
1047
|
+
char *buddy_data;
|
|
1048
|
+
// char* account_name;
|
|
1049
|
+
int state_buddy_contact_count;
|
|
1050
|
+
vx_state_buddy_contact_t **state_buddy_contacts;
|
|
1051
|
+
} vx_state_buddy_t;
|
|
1052
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1053
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_create(vx_state_buddy_t **buddy);
|
|
1054
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_free(vx_state_buddy_t *buddy);
|
|
1055
|
+
#endif
|
|
1056
|
+
typedef vx_state_buddy_t *vx_state_buddy_ref_t;
|
|
1057
|
+
typedef vx_state_buddy_ref_t *vx_state_buddy_list_t;
|
|
1058
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1059
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_list_create(int size, vx_state_buddy_list_t *list_out);
|
|
1060
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_list_free(vx_state_buddy_t **list, int size);
|
|
1061
|
+
#endif
|
|
1062
|
+
|
|
1063
|
+
typedef struct vx_state_buddy_group {
|
|
1064
|
+
int group_id;
|
|
1065
|
+
char *group_name;
|
|
1066
|
+
char *group_data;
|
|
1067
|
+
} vx_state_buddy_group_t;
|
|
1068
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1069
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_group_create(vx_state_buddy_group_t **group);
|
|
1070
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_group_free(vx_state_buddy_group_t *group);
|
|
1071
|
+
#endif
|
|
1072
|
+
typedef vx_state_buddy_group_t *vx_state_buddy_group_ref_t;
|
|
1073
|
+
typedef vx_state_buddy_group_ref_t *vx_state_buddy_group_list_t;
|
|
1074
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1075
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_group_list_create(int size, vx_state_buddy_group_list_t *list_out);
|
|
1076
|
+
VIVOXSDK_DLLEXPORT int vx_state_buddy_group_list_free(vx_state_buddy_group_t **list, int size);
|
|
1077
|
+
#endif
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* Channel participant.
|
|
1081
|
+
*/
|
|
1082
|
+
typedef struct vx_participant {
|
|
1083
|
+
char *uri;
|
|
1084
|
+
char *first_name;
|
|
1085
|
+
char *last_name;
|
|
1086
|
+
char *display_name;
|
|
1087
|
+
char *username;
|
|
1088
|
+
int is_moderator;
|
|
1089
|
+
int is_moderator_muted;
|
|
1090
|
+
int is_moderator_text_muted;
|
|
1091
|
+
int is_muted_for_me; // NOT CURRENTLY IMPLEMENTED
|
|
1092
|
+
int is_owner;
|
|
1093
|
+
int account_id; /**< Deprecated */
|
|
1094
|
+
} vx_participant_t;
|
|
1095
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1096
|
+
VIVOXSDK_DLLEXPORT int vx_participant_create(vx_participant_t **participant);
|
|
1097
|
+
VIVOXSDK_DLLEXPORT int vx_participant_free(vx_participant_t *participant);
|
|
1098
|
+
#endif
|
|
1099
|
+
/** Creates a participant list with the given size. */
|
|
1100
|
+
typedef vx_participant_t *vx_participant_ref_t;
|
|
1101
|
+
typedef vx_participant_ref_t *vx_participant_list_t;
|
|
1102
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1103
|
+
VIVOXSDK_DLLEXPORT int vx_participant_list_create(int size, vx_participant_list_t *list_out);
|
|
1104
|
+
VIVOXSDK_DLLEXPORT int vx_participant_list_free(vx_participant_t **list, int size);
|
|
1105
|
+
#endif
|
|
1106
|
+
|
|
1107
|
+
/** State participant.
|
|
1108
|
+
* Only used for state dump.
|
|
1109
|
+
*/
|
|
1110
|
+
typedef struct vx_state_participant {
|
|
1111
|
+
char *uri;
|
|
1112
|
+
char *display_name;
|
|
1113
|
+
int is_audio_enabled;
|
|
1114
|
+
int is_text_enabled;
|
|
1115
|
+
int is_audio_muted_for_me;
|
|
1116
|
+
int is_text_muted_for_me; // Not currently supported.
|
|
1117
|
+
int is_audio_moderator_muted;
|
|
1118
|
+
int is_text_moderator_muted;
|
|
1119
|
+
int is_hand_raised;
|
|
1120
|
+
int is_typing;
|
|
1121
|
+
int is_speaking;
|
|
1122
|
+
int volume;
|
|
1123
|
+
double energy;
|
|
1124
|
+
vx_participant_type type;
|
|
1125
|
+
int is_anonymous_login;
|
|
1126
|
+
} vx_state_participant_t;
|
|
1127
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1128
|
+
VIVOXSDK_DLLEXPORT int vx_state_participant_create(vx_state_participant_t **state_participant);
|
|
1129
|
+
VIVOXSDK_DLLEXPORT int vx_state_participant_free(vx_state_participant_t *state_participant);
|
|
1130
|
+
#endif
|
|
1131
|
+
/** Creates a state_participant list with the given size. */
|
|
1132
|
+
typedef vx_state_participant_t *vx_state_participant_ref_t;
|
|
1133
|
+
typedef vx_state_participant_ref_t *vx_state_participant_list_t;
|
|
1134
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1135
|
+
VIVOXSDK_DLLEXPORT int vx_state_participant_list_create(int size, vx_state_participant_list_t *list_out);
|
|
1136
|
+
VIVOXSDK_DLLEXPORT int vx_state_participant_list_free(vx_state_participant_t **list, int size);
|
|
1137
|
+
#endif
|
|
1138
|
+
|
|
1139
|
+
/** State session.
|
|
1140
|
+
* Only used for state dump.
|
|
1141
|
+
*/
|
|
1142
|
+
typedef struct vx_state_session {
|
|
1143
|
+
char *session_handle;
|
|
1144
|
+
char *uri;
|
|
1145
|
+
char *name;
|
|
1146
|
+
int is_audio_muted_for_me;
|
|
1147
|
+
int is_text_muted_for_me; // Not currently supported.
|
|
1148
|
+
int is_transmitting;
|
|
1149
|
+
int is_focused;
|
|
1150
|
+
int volume;
|
|
1151
|
+
int session_font_id;
|
|
1152
|
+
int has_audio;
|
|
1153
|
+
int has_text;
|
|
1154
|
+
int is_incoming;
|
|
1155
|
+
int is_positional;
|
|
1156
|
+
int is_connected;
|
|
1157
|
+
int state_participant_count;
|
|
1158
|
+
vx_state_participant_t **state_participants;
|
|
1159
|
+
char *durable_media_id;
|
|
1160
|
+
} vx_state_session_t;
|
|
1161
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1162
|
+
VIVOXSDK_DLLEXPORT int vx_state_session_create(vx_state_session_t **state_session);
|
|
1163
|
+
VIVOXSDK_DLLEXPORT int vx_state_session_free(vx_state_session_t *state_session);
|
|
1164
|
+
#endif
|
|
1165
|
+
/** Creates a state_session list with the given size. */
|
|
1166
|
+
typedef vx_state_session_t *vx_state_session_ref_t;
|
|
1167
|
+
typedef vx_state_session_ref_t *vx_state_session_list_t;
|
|
1168
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1169
|
+
VIVOXSDK_DLLEXPORT int vx_state_session_list_create(int size, vx_state_session_list_t *list_out);
|
|
1170
|
+
VIVOXSDK_DLLEXPORT int vx_state_session_list_free(vx_state_session_t **list, int size);
|
|
1171
|
+
#endif
|
|
1172
|
+
|
|
1173
|
+
/** State session group.
|
|
1174
|
+
* Only used for state dump.
|
|
1175
|
+
*/
|
|
1176
|
+
typedef struct vx_state_sessiongroup {
|
|
1177
|
+
char *sessiongroup_handle;
|
|
1178
|
+
int state_sessions_count;
|
|
1179
|
+
vx_state_session_t **state_sessions;
|
|
1180
|
+
int in_delayed_playback;
|
|
1181
|
+
double current_playback_speed;
|
|
1182
|
+
vx_sessiongroup_playback_mode current_playback_mode;
|
|
1183
|
+
int playback_paused;
|
|
1184
|
+
int loop_buffer_capacity;
|
|
1185
|
+
int first_loop_frame;
|
|
1186
|
+
int total_loop_frames_captured;
|
|
1187
|
+
int last_loop_frame_played;
|
|
1188
|
+
char *current_recording_filename;
|
|
1189
|
+
int total_recorded_frames;
|
|
1190
|
+
} vx_state_sessiongroup_t;
|
|
1191
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1192
|
+
VIVOXSDK_DLLEXPORT int vx_state_sessiongroup_create(vx_state_sessiongroup_t **state_sessiongroup);
|
|
1193
|
+
VIVOXSDK_DLLEXPORT int vx_state_sessiongroup_free(vx_state_sessiongroup_t *state_sessiongroup);
|
|
1194
|
+
#endif
|
|
1195
|
+
/** Creates a state_sessiongroup list with the given size. */
|
|
1196
|
+
typedef vx_state_sessiongroup_t *vx_state_sessiongroup_ref_t;
|
|
1197
|
+
typedef vx_state_sessiongroup_ref_t *vx_state_sessiongroup_list_t;
|
|
1198
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1199
|
+
VIVOXSDK_DLLEXPORT int vx_state_sessiongroup_list_create(int size, vx_state_sessiongroup_list_t *list_out);
|
|
1200
|
+
VIVOXSDK_DLLEXPORT int vx_state_sessiongroup_list_free(vx_state_sessiongroup_t **list, int size);
|
|
1201
|
+
#endif
|
|
1202
|
+
|
|
1203
|
+
/** State account.
|
|
1204
|
+
* Only used for state dump.
|
|
1205
|
+
*/
|
|
1206
|
+
typedef struct vx_state_account {
|
|
1207
|
+
char *account_handle;
|
|
1208
|
+
char *account_uri;
|
|
1209
|
+
char *display_name;
|
|
1210
|
+
int is_anonymous_login;
|
|
1211
|
+
int state_sessiongroups_count;
|
|
1212
|
+
vx_login_state_change_state state;
|
|
1213
|
+
vx_state_sessiongroup_t **state_sessiongroups;
|
|
1214
|
+
int state_buddy_count;
|
|
1215
|
+
int state_buddy_group_count;
|
|
1216
|
+
vx_state_buddy_t **state_buddies;
|
|
1217
|
+
vx_state_buddy_group_t **state_buddy_groups;
|
|
1218
|
+
} vx_state_account_t;
|
|
1219
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1220
|
+
VIVOXSDK_DLLEXPORT int vx_state_account_create(vx_state_account_t **state_account);
|
|
1221
|
+
VIVOXSDK_DLLEXPORT int vx_state_account_free(vx_state_account_t *state_account);
|
|
1222
|
+
#endif
|
|
1223
|
+
/** Creates a state_account list with the given size. */
|
|
1224
|
+
typedef vx_state_account_t *vx_state_account_ref_t;
|
|
1225
|
+
typedef vx_state_account_ref_t *vx_state_account_list_t;
|
|
1226
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1227
|
+
VIVOXSDK_DLLEXPORT int vx_state_account_list_create(int size, vx_state_account_list_t *list_out);
|
|
1228
|
+
VIVOXSDK_DLLEXPORT int vx_state_account_list_free(vx_state_account_t **list, int size);
|
|
1229
|
+
#endif
|
|
1230
|
+
|
|
1231
|
+
/** State connector.
|
|
1232
|
+
* Only used for state dump.
|
|
1233
|
+
*/
|
|
1234
|
+
typedef struct vx_state_connector {
|
|
1235
|
+
char *connector_handle;
|
|
1236
|
+
int state_accounts_count;
|
|
1237
|
+
vx_state_account_t **state_accounts;
|
|
1238
|
+
int mic_vol;
|
|
1239
|
+
int mic_mute;
|
|
1240
|
+
int speaker_vol;
|
|
1241
|
+
int speaker_mute;
|
|
1242
|
+
} vx_state_connector_t;
|
|
1243
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1244
|
+
VIVOXSDK_DLLEXPORT int vx_state_connector_create(vx_state_connector_t **state_connector);
|
|
1245
|
+
VIVOXSDK_DLLEXPORT int vx_state_connector_free(vx_state_connector_t *state_connector);
|
|
1246
|
+
#endif
|
|
1247
|
+
/** Creates a state_connector list with the given size. */
|
|
1248
|
+
typedef vx_state_connector_t *vx_state_connector_ref_t;
|
|
1249
|
+
typedef vx_state_connector_ref_t *vx_state_connector_list_t;
|
|
1250
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1251
|
+
VIVOXSDK_DLLEXPORT int vx_state_connector_list_create(int size, vx_state_connector_list_t *list_out);
|
|
1252
|
+
VIVOXSDK_DLLEXPORT int vx_state_connector_list_free(vx_state_connector_t **list, int size);
|
|
1253
|
+
#endif
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Channel struct.
|
|
1257
|
+
*/
|
|
1258
|
+
typedef struct vx_channel {
|
|
1259
|
+
/**
|
|
1260
|
+
* The name of the channel.
|
|
1261
|
+
*/
|
|
1262
|
+
char *channel_name;
|
|
1263
|
+
|
|
1264
|
+
/**
|
|
1265
|
+
* The description of the channel.
|
|
1266
|
+
*/
|
|
1267
|
+
char *channel_desc;
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
* Not currently implemented.
|
|
1271
|
+
*/
|
|
1272
|
+
char *host;
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* \deprecated This is deprecated and should not be used.
|
|
1276
|
+
* The numeric identifier of the channel.
|
|
1277
|
+
* @deprecated
|
|
1278
|
+
*/
|
|
1279
|
+
int channel_id;
|
|
1280
|
+
|
|
1281
|
+
/**
|
|
1282
|
+
* The maximum number of participants allowed in the channel.
|
|
1283
|
+
*/
|
|
1284
|
+
int limit;
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* \deprecated This is deprecated and should not be used.
|
|
1288
|
+
* The forecasted number of participants in the channel.
|
|
1289
|
+
* @deprecated
|
|
1290
|
+
*/
|
|
1291
|
+
int capacity;
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* The date and time that the channel was modified.
|
|
1295
|
+
*/
|
|
1296
|
+
char *modified;
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* The URI of the channel owner.
|
|
1300
|
+
*/
|
|
1301
|
+
char *owner;
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* The user name of the channel owner.
|
|
1305
|
+
*/
|
|
1306
|
+
char *owner_user_name;
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* A flag that indicates whether the channel is persistent.
|
|
1310
|
+
* If the channel is not persistent, then it is deleted automatically after a certain period of inactivity.
|
|
1311
|
+
*/
|
|
1312
|
+
int is_persistent; /* 1 true, <= 0 false */
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* A flag that indicates whether the channel is password protected.
|
|
1316
|
+
*/
|
|
1317
|
+
int is_protected; /* 1 true, <= 0 false */
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* \deprecated This is deprecated and should not be used.
|
|
1321
|
+
* @deprecated
|
|
1322
|
+
*/
|
|
1323
|
+
int size;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Identifies this as a channel (0) or as a positional (2).
|
|
1327
|
+
*/
|
|
1328
|
+
int type;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* The mode of the channel: none (0), normal (1), presentation (2), lecture (3), or open (4).
|
|
1332
|
+
*/
|
|
1333
|
+
vx_channel_mode mode;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* The URI of the channel.
|
|
1337
|
+
* Join the channel and perform moderator actions against the channel.
|
|
1338
|
+
*/
|
|
1339
|
+
char *channel_uri;
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* The distance beyond which a participant is considered "out of range."
|
|
1343
|
+
* When a participant crosses this threshold distance from a particular listening position in a positional channel,
|
|
1344
|
+
* a participant update event is fired, which results in an entry being added (or removed) from the user's speakers list.
|
|
1345
|
+
* No audio is received for participants beyond this range.
|
|
1346
|
+
* The default value is 60.
|
|
1347
|
+
* This uses server defaults on create, and leaves existing values unchanged on update.
|
|
1348
|
+
*/
|
|
1349
|
+
int max_range;
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* The distance from the listener below which the "gain rolloff" effects for a given audio rolloff model are not applied.
|
|
1353
|
+
* This is effectively the "audio plateau" distance: gain is constant up to this distance, and then falls off.
|
|
1354
|
+
* The default value is 3.
|
|
1355
|
+
* This uses server defaults on create, and leaves existing values unchanged on update.
|
|
1356
|
+
*/
|
|
1357
|
+
int clamping_dist;
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* Indicates how sharp the audio attenuation will "rolloff" between the clamping and maximum distances.
|
|
1361
|
+
* Larger values result in steeper rolloffs.
|
|
1362
|
+
* The extent of rolloff depends on the selected distance model.
|
|
1363
|
+
* The default value is 1.1.
|
|
1364
|
+
* This uses server defaults on create, and leaves existing values unchanged on update.
|
|
1365
|
+
*/
|
|
1366
|
+
double roll_off;
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* The (render side) loudness for all speakers in this channel.
|
|
1370
|
+
* The default value is 1.7.
|
|
1371
|
+
* This uses server defaults on create, and leaves existing values unchanged on update.
|
|
1372
|
+
*
|
|
1373
|
+
* \note This is a receive side value, and in practice, should not be raised above a value such as 2.5.
|
|
1374
|
+
*/
|
|
1375
|
+
double max_gain;
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* The distance model for the channel.
|
|
1379
|
+
* This tells the server which algorithm to use when computing attenuation.
|
|
1380
|
+
* The audio from speakers abruptly drops to 0 at the maximum distance.
|
|
1381
|
+
* There are four possible values in this field:
|
|
1382
|
+
* - 0 - None:
|
|
1383
|
+
* - No distance-based attenuation is applied.
|
|
1384
|
+
* All speakers are rendered as if they were in the same position as the listener.
|
|
1385
|
+
* - 1 - Inverse Distance Clamped:
|
|
1386
|
+
* - The attenuation increases in inverse proportion to the distance.
|
|
1387
|
+
* The rolloff factor n is the inverse of the slope of the attenuation curve.
|
|
1388
|
+
* - 2 - Linear Distance Clamped:
|
|
1389
|
+
* - The attenuation increases in linear proportion to the distance.
|
|
1390
|
+
* The rolloff factor is the negative slope of the attenuation curve.
|
|
1391
|
+
* - 3 - Exponent Distance Clamped:
|
|
1392
|
+
* - The attenuation increases in inverse proportion to the distance raised to the
|
|
1393
|
+
* power of the rolloff factor.
|
|
1394
|
+
* The default audio model is 1 - Inverse Distance Clamped.
|
|
1395
|
+
* This uses server defaults on create, and leaves existing values unchanged on update.
|
|
1396
|
+
*
|
|
1397
|
+
* \note If channel_type == dir, this does not apply.
|
|
1398
|
+
*/
|
|
1399
|
+
int dist_model;
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* Indicates whether audio is encrypted.
|
|
1403
|
+
*/
|
|
1404
|
+
int encrypt_audio;
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* The display name of the channel owner.
|
|
1408
|
+
*/
|
|
1409
|
+
char *owner_display_name;
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* The number of participants in the channel.
|
|
1413
|
+
*/
|
|
1414
|
+
int active_participants;
|
|
1415
|
+
} vx_channel_t;
|
|
1416
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1417
|
+
VIVOXSDK_DLLEXPORT int vx_channel_create(vx_channel_t **channel);
|
|
1418
|
+
VIVOXSDK_DLLEXPORT int vx_channel_free(vx_channel_t *channel);
|
|
1419
|
+
#endif
|
|
1420
|
+
typedef vx_channel_t *vx_channel_ref_t;
|
|
1421
|
+
typedef vx_channel_ref_t *vx_channel_list_t;
|
|
1422
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1423
|
+
VIVOXSDK_DLLEXPORT int vx_channel_list_create(int size, vx_channel_list_t *list_out);
|
|
1424
|
+
VIVOXSDK_DLLEXPORT int vx_channel_list_free(vx_channel_t **list, int size);
|
|
1425
|
+
#endif
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Voice font struct.
|
|
1429
|
+
*/
|
|
1430
|
+
typedef struct vx_voice_font {
|
|
1431
|
+
int id;
|
|
1432
|
+
int parent_id;
|
|
1433
|
+
vx_font_type type;
|
|
1434
|
+
char *name;
|
|
1435
|
+
char *description;
|
|
1436
|
+
char *expiration_date;
|
|
1437
|
+
int expired; // 0 is false, 1 is true
|
|
1438
|
+
char *font_delta;
|
|
1439
|
+
char *font_rules;
|
|
1440
|
+
vx_font_status status;
|
|
1441
|
+
} vx_voice_font_t;
|
|
1442
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1443
|
+
VIVOXSDK_DLLEXPORT int vx_voice_font_create(vx_voice_font_t **channel);
|
|
1444
|
+
VIVOXSDK_DLLEXPORT int vx_voice_font_free(vx_voice_font_t *channel);
|
|
1445
|
+
#endif
|
|
1446
|
+
typedef vx_voice_font_t *vx_voice_font_ref_t;
|
|
1447
|
+
typedef vx_voice_font_ref_t *vx_voice_font_list_t;
|
|
1448
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1449
|
+
VIVOXSDK_DLLEXPORT int vx_voice_font_list_create(int size, vx_voice_font_list_t *list_out);
|
|
1450
|
+
VIVOXSDK_DLLEXPORT int vx_voice_font_list_free(vx_voice_font_t **list, int size);
|
|
1451
|
+
VIVOXSDK_DLLEXPORT int vx_string_list_create(int size, char ***list_out);
|
|
1452
|
+
VIVOXSDK_DLLEXPORT int vx_string_list_free(char **list);
|
|
1453
|
+
#endif
|
|
1454
|
+
|
|
1455
|
+
typedef struct vx_block_rule {
|
|
1456
|
+
char *block_mask;
|
|
1457
|
+
int presence_only;
|
|
1458
|
+
} vx_block_rule_t;
|
|
1459
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1460
|
+
VIVOXSDK_DLLEXPORT int vx_block_rule_create(vx_block_rule_t **block_rule);
|
|
1461
|
+
VIVOXSDK_DLLEXPORT int vx_block_rule_free(vx_block_rule_t *block_rule);
|
|
1462
|
+
#endif
|
|
1463
|
+
|
|
1464
|
+
typedef vx_block_rule_t *vx_block_rule_ref_t;
|
|
1465
|
+
typedef vx_block_rule_ref_t *vx_block_rules_t;
|
|
1466
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1467
|
+
VIVOXSDK_DLLEXPORT int vx_block_rules_create(int size, vx_block_rules_t *list_out);
|
|
1468
|
+
VIVOXSDK_DLLEXPORT int vx_block_rules_free(vx_block_rule_t **list, int size);
|
|
1469
|
+
#endif
|
|
1470
|
+
|
|
1471
|
+
typedef struct vx_auto_accept_rule {
|
|
1472
|
+
char *auto_accept_mask;
|
|
1473
|
+
int auto_add_as_buddy;
|
|
1474
|
+
char *auto_accept_nickname;
|
|
1475
|
+
} vx_auto_accept_rule_t;
|
|
1476
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1477
|
+
VIVOXSDK_DLLEXPORT int vx_auto_accept_rule_create(vx_auto_accept_rule_t **auto_accept_rule);
|
|
1478
|
+
VIVOXSDK_DLLEXPORT int vx_auto_accept_rule_free(vx_auto_accept_rule_t *auto_accept_rule);
|
|
1479
|
+
#endif
|
|
1480
|
+
typedef vx_auto_accept_rule_t *vx_auto_accept_rule_ref_t;
|
|
1481
|
+
typedef vx_auto_accept_rule_ref_t *vx_auto_accept_rules_t;
|
|
1482
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1483
|
+
VIVOXSDK_DLLEXPORT int vx_auto_accept_rules_create(int size, vx_auto_accept_rules_t *list_out);
|
|
1484
|
+
VIVOXSDK_DLLEXPORT int vx_auto_accept_rules_free(vx_auto_accept_rule_t **list, int size);
|
|
1485
|
+
#endif
|
|
1486
|
+
|
|
1487
|
+
typedef struct vx_user_channel {
|
|
1488
|
+
char *uri;
|
|
1489
|
+
char *name;
|
|
1490
|
+
} vx_user_channel_t;
|
|
1491
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1492
|
+
VIVOXSDK_DLLEXPORT int vx_user_channel_create(vx_user_channel_t **user_channel);
|
|
1493
|
+
VIVOXSDK_DLLEXPORT int vx_user_channel_free(vx_user_channel_t *user_channel);
|
|
1494
|
+
#endif
|
|
1495
|
+
|
|
1496
|
+
typedef vx_user_channel_t *vx_user_channel_ref_t;
|
|
1497
|
+
typedef vx_user_channel_ref_t *vx_user_channels_t;
|
|
1498
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1499
|
+
VIVOXSDK_DLLEXPORT int vx_user_channels_create(int size, vx_user_channels_t *list_out);
|
|
1500
|
+
VIVOXSDK_DLLEXPORT int vx_user_channels_free(vx_user_channel_t **list, int size);
|
|
1501
|
+
#endif
|
|
1502
|
+
|
|
1503
|
+
/**
|
|
1504
|
+
* test_type - Enumeration that defines the test performed (for values, see appendix ?15.8).
|
|
1505
|
+
* error_code - Enumeration that defines the error or success of the test (for values, see appendix ?15.9).
|
|
1506
|
+
* test_additional_info - Any additional information for this test. For example, this could be the IP addresses used, port numbers, or error information.
|
|
1507
|
+
*/
|
|
1508
|
+
typedef struct vx_connectivity_test_result {
|
|
1509
|
+
ND_TEST_TYPE test_type;
|
|
1510
|
+
ND_ERROR test_error_code;
|
|
1511
|
+
char *test_additional_info;
|
|
1512
|
+
} vx_connectivity_test_result_t;
|
|
1513
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1514
|
+
VIVOXSDK_DLLEXPORT int vx_connectivity_test_result_create(vx_connectivity_test_result_t **connectivity_test_result, ND_TEST_TYPE tt);
|
|
1515
|
+
VIVOXSDK_DLLEXPORT int vx_connectivity_test_result_free(vx_connectivity_test_result_t *connectivity_test_result);
|
|
1516
|
+
#endif
|
|
1517
|
+
typedef vx_connectivity_test_result_t *vx_connectivity_test_result_ref_t;
|
|
1518
|
+
typedef vx_connectivity_test_result_ref_t *vx_connectivity_test_results_t;
|
|
1519
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1520
|
+
VIVOXSDK_DLLEXPORT int vx_connectivity_test_results_create(int size, vx_connectivity_test_results_t *list_out);
|
|
1521
|
+
VIVOXSDK_DLLEXPORT int vx_connectivity_test_results_free(vx_connectivity_test_result_t **list, int size);
|
|
1522
|
+
#endif
|
|
1523
|
+
|
|
1524
|
+
typedef struct vx_account {
|
|
1525
|
+
char *uri;
|
|
1526
|
+
char *firstname;
|
|
1527
|
+
char *lastname;
|
|
1528
|
+
char *username;
|
|
1529
|
+
char *displayname;
|
|
1530
|
+
char *email;
|
|
1531
|
+
char *phone;
|
|
1532
|
+
char *carrier; // Not currently implemented.
|
|
1533
|
+
char *created_date;
|
|
1534
|
+
} vx_account_t;
|
|
1535
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1536
|
+
VIVOXSDK_DLLEXPORT int vx_account_create(vx_account_t **account);
|
|
1537
|
+
VIVOXSDK_DLLEXPORT int vx_account_free(vx_account_t *account);
|
|
1538
|
+
#endif
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* The type of device.
|
|
1542
|
+
*/
|
|
1543
|
+
typedef enum vx_device_type {
|
|
1544
|
+
/**
|
|
1545
|
+
* This type is a specific device.
|
|
1546
|
+
*/
|
|
1547
|
+
vx_device_type_specific_device = 0,
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* This type means to use whatever the system has configured as a default at the time of the call.
|
|
1551
|
+
* \note If the default system device changes, then you should not switch devices mid-call.
|
|
1552
|
+
*/
|
|
1553
|
+
vx_device_type_default_system = 1,
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* This is the null device, which means that either the input or output from or to that device does not occur.
|
|
1557
|
+
*/
|
|
1558
|
+
vx_device_type_null = 2,
|
|
1559
|
+
|
|
1560
|
+
/**
|
|
1561
|
+
* This type means to use whatever the system has configured as a default communication device at the time of the call.
|
|
1562
|
+
* \note If the default communication device changes, then you should not switch devices mid-call.
|
|
1563
|
+
*/
|
|
1564
|
+
vx_device_type_default_communication = 3
|
|
1565
|
+
} vx_device_type_t;
|
|
1566
|
+
|
|
1567
|
+
typedef struct vx_device {
|
|
1568
|
+
/**
|
|
1569
|
+
* The identifier that is used to pass to vx_req_set_render_device or vx_req_set_capture_device.
|
|
1570
|
+
*/
|
|
1571
|
+
char *device;
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* The display name to present to the user.
|
|
1575
|
+
*/
|
|
1576
|
+
char *display_name;
|
|
1577
|
+
|
|
1578
|
+
/**
|
|
1579
|
+
* The type of device.
|
|
1580
|
+
*/
|
|
1581
|
+
vx_device_type_t device_type;
|
|
1582
|
+
} vx_device_t;
|
|
1583
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1584
|
+
VIVOXSDK_DLLEXPORT int vx_device_create(vx_device_t **device);
|
|
1585
|
+
VIVOXSDK_DLLEXPORT int vx_device_free(vx_device_t *device);
|
|
1586
|
+
#endif
|
|
1587
|
+
typedef vx_device_t *vx_device_ref_t;
|
|
1588
|
+
typedef vx_device_ref_t *vx_devices_t;
|
|
1589
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1590
|
+
VIVOXSDK_DLLEXPORT int vx_devices_create(int size, vx_devices_t *list_out);
|
|
1591
|
+
VIVOXSDK_DLLEXPORT int vx_devices_free(vx_device_t **list, int size);
|
|
1592
|
+
#endif
|
|
1593
|
+
|
|
1594
|
+
typedef struct vx_buddy {
|
|
1595
|
+
char *buddy_uri;
|
|
1596
|
+
char *display_name;
|
|
1597
|
+
int parent_group_id;
|
|
1598
|
+
char *buddy_data;
|
|
1599
|
+
int account_id; /**< Deprecated */
|
|
1600
|
+
char *account_name;
|
|
1601
|
+
} vx_buddy_t;
|
|
1602
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1603
|
+
VIVOXSDK_DLLEXPORT int vx_buddy_create(vx_buddy_t **buddy);
|
|
1604
|
+
VIVOXSDK_DLLEXPORT int vx_buddy_free(vx_buddy_t *buddy);
|
|
1605
|
+
#endif
|
|
1606
|
+
typedef vx_buddy_t *vx_buddy_ref_t;
|
|
1607
|
+
typedef vx_buddy_ref_t *vx_buddy_list_t;
|
|
1608
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1609
|
+
VIVOXSDK_DLLEXPORT int vx_buddy_list_create(int size, vx_buddy_list_t *list_out);
|
|
1610
|
+
VIVOXSDK_DLLEXPORT int vx_buddy_list_free(vx_buddy_t **list, int size);
|
|
1611
|
+
#endif
|
|
1612
|
+
|
|
1613
|
+
typedef struct vx_group {
|
|
1614
|
+
int group_id;
|
|
1615
|
+
char *group_name;
|
|
1616
|
+
char *group_data;
|
|
1617
|
+
} vx_group_t;
|
|
1618
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1619
|
+
VIVOXSDK_DLLEXPORT int vx_group_create(vx_group_t **group);
|
|
1620
|
+
VIVOXSDK_DLLEXPORT int vx_group_free(vx_group_t *group);
|
|
1621
|
+
#endif
|
|
1622
|
+
typedef vx_group_t *vx_group_ref_t;
|
|
1623
|
+
typedef vx_group_ref_t *vx_group_list_t;
|
|
1624
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1625
|
+
VIVOXSDK_DLLEXPORT int vx_group_list_create(int size, vx_group_list_t *list_out);
|
|
1626
|
+
VIVOXSDK_DLLEXPORT int vx_group_list_free(vx_group_t **list, int size);
|
|
1627
|
+
#endif
|
|
1628
|
+
|
|
1629
|
+
typedef struct vx_name_value_pair {
|
|
1630
|
+
/**
|
|
1631
|
+
* The name of the parameter.
|
|
1632
|
+
*/
|
|
1633
|
+
char *name;
|
|
1634
|
+
|
|
1635
|
+
/**
|
|
1636
|
+
* The value of the parameter.
|
|
1637
|
+
*/
|
|
1638
|
+
char *value;
|
|
1639
|
+
} vx_name_value_pair_t;
|
|
1640
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1641
|
+
VIVOXSDK_DLLEXPORT int vx_name_value_pair_create(vx_name_value_pair_t **nvpair);
|
|
1642
|
+
VIVOXSDK_DLLEXPORT int vx_name_value_pair_free(vx_name_value_pair_t *nvpair);
|
|
1643
|
+
#endif
|
|
1644
|
+
typedef vx_name_value_pair_t *vx_name_value_pair_ref_t;
|
|
1645
|
+
typedef vx_name_value_pair_ref_t *vx_name_value_pairs_t;
|
|
1646
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1647
|
+
VIVOXSDK_DLLEXPORT int vx_name_value_pairs_create(int size, vx_name_value_pairs_t *list_out);
|
|
1648
|
+
VIVOXSDK_DLLEXPORT int vx_name_value_pairs_free(vx_name_value_pair_t **list, int size);
|
|
1649
|
+
#endif
|
|
1650
|
+
|
|
1651
|
+
typedef enum {
|
|
1652
|
+
vx_conversation_channel = 0,
|
|
1653
|
+
vx_conversation_direct = 1
|
|
1654
|
+
} vx_conversation_type;
|
|
1655
|
+
|
|
1656
|
+
typedef struct vx_conversation {
|
|
1657
|
+
char *name;
|
|
1658
|
+
vx_conversation_type type;
|
|
1659
|
+
char *display_name;
|
|
1660
|
+
int unread_count;
|
|
1661
|
+
} vx_conversation_t;
|
|
1662
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1663
|
+
VIVOXSDK_DLLEXPORT int vx_conversation_create(vx_conversation_t **conversation);
|
|
1664
|
+
VIVOXSDK_DLLEXPORT int vx_conversation_free(vx_conversation_t *conversation);
|
|
1665
|
+
#endif
|
|
1666
|
+
typedef vx_conversation_t *vx_conversation_ref_t;
|
|
1667
|
+
typedef vx_conversation_ref_t *vx_conversation_list_t;
|
|
1668
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1669
|
+
VIVOXSDK_DLLEXPORT int vx_conversation_list_create(int size, vx_conversation_list_t *list_out);
|
|
1670
|
+
VIVOXSDK_DLLEXPORT int vx_conversation_list_free(int size, vx_conversation_t **list);
|
|
1671
|
+
#endif
|
|
1672
|
+
|
|
1673
|
+
/* Vivox SDK functions */
|
|
1674
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
1675
|
+
/**
|
|
1676
|
+
* Allocate string data to send to the SDK.
|
|
1677
|
+
* \note This function will not work until vx_initialize3() is called and after vx_uninitialize() is called.
|
|
1678
|
+
* \ingroup memorymanagement
|
|
1679
|
+
*/
|
|
1680
|
+
VIVOXSDK_DLLEXPORT char *vx_strdup(const char *);
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* Free string data returned to the application.
|
|
1684
|
+
* This function is rarely used in practice.
|
|
1685
|
+
* \note This function will not work until vx_initialize3() is called and after vx_uninitialize() is called.
|
|
1686
|
+
* \ingroup memorymanagement
|
|
1687
|
+
*/
|
|
1688
|
+
VIVOXSDK_DLLEXPORT int vx_free(char *);
|
|
1689
|
+
|
|
1690
|
+
VIVOXSDK_DLLEXPORT int vx_unallocate(void *p);
|
|
1691
|
+
|
|
1692
|
+
VIVOXSDK_DLLEXPORT void *vx_allocate(size_t nBytes);
|
|
1693
|
+
VIVOXSDK_DLLEXPORT void *vx_reallocate(void *p, size_t nBytes);
|
|
1694
|
+
VIVOXSDK_DLLEXPORT void *vx_calloc(size_t num, size_t bytesPerElement);
|
|
1695
|
+
|
|
1696
|
+
VIVOXSDK_DLLEXPORT void *vx_allocate_aligned(size_t alignment, size_t size);
|
|
1697
|
+
VIVOXSDK_DLLEXPORT int vx_unallocate_aligned(void *p);
|
|
1698
|
+
|
|
1699
|
+
#define VX_GET_MESSAGE_NO_MESSAGE -1
|
|
1700
|
+
#define VX_GET_MESSAGE_AVAILABLE 0
|
|
1701
|
+
#define VX_GET_MESSAGE_FAILURE 1
|
|
1702
|
+
|
|
1703
|
+
/**
|
|
1704
|
+
* The VxSDK polling function.
|
|
1705
|
+
* This should be called periodically to check for any incoming events.
|
|
1706
|
+
*
|
|
1707
|
+
* @param message [out] The object containing the message data.
|
|
1708
|
+
* @return The status of the poll: VX_GET_MESSAGE_AVAILABLE = Success, VX_GET_MESSAGE_FAILURE = Failure, VX_GET_MESSAGE_NO_MESSAGE = No Message Available
|
|
1709
|
+
* \ingroup messaging
|
|
1710
|
+
*/
|
|
1711
|
+
VIVOXSDK_DLLEXPORT int vx_get_message(vx_message_base_t **message);
|
|
1712
|
+
|
|
1713
|
+
/**
|
|
1714
|
+
* \deprecated Use vx_issue_request2 instead.
|
|
1715
|
+
* Execute the given request.
|
|
1716
|
+
* On V4: This function initializes the SDK automatically if not already initialized (see vx_initialize3()).
|
|
1717
|
+
* On V5: This function has the same behavior as vx_issue_request2.
|
|
1718
|
+
*
|
|
1719
|
+
* @param request The request object to execute. This is of one of the vx_req_* structs.
|
|
1720
|
+
* @return The success status of the request.
|
|
1721
|
+
* \ingroup messaging
|
|
1722
|
+
* @deprecated
|
|
1723
|
+
*/
|
|
1724
|
+
VIVOXSDK_DLLEXPORT int vx_issue_request(vx_req_base_t *request);
|
|
1725
|
+
|
|
1726
|
+
/**
|
|
1727
|
+
* Execute the given request.
|
|
1728
|
+
* This function returns an error if the SDK is not initialized (see vx_initialize3()).
|
|
1729
|
+
*
|
|
1730
|
+
* @param request The request object to execute. This is of one of the vx_req_* structs.
|
|
1731
|
+
* @return The success status of the request.
|
|
1732
|
+
* \ingroup messaging
|
|
1733
|
+
*/
|
|
1734
|
+
VIVOXSDK_DLLEXPORT int vx_issue_request2(vx_req_base_t *request);
|
|
1735
|
+
|
|
1736
|
+
/**
|
|
1737
|
+
* Execute the given request.
|
|
1738
|
+
* This function returns an error if the SDK is not initialized (see vx_initialize3()).
|
|
1739
|
+
*
|
|
1740
|
+
* @param request The request object to execute. This is of one of the vx_req_* structs.
|
|
1741
|
+
* @param request_count If non-null, vx_issue_request3 outputs the number of requests that are still outstanding.
|
|
1742
|
+
* Requests at a rate of 12 requests per second - an application can use this value to determine
|
|
1743
|
+
* if the application is issuing requests at an unacceptable rate.
|
|
1744
|
+
* @return The success status of the request.
|
|
1745
|
+
* \ingroup messaging
|
|
1746
|
+
*/
|
|
1747
|
+
VIVOXSDK_DLLEXPORT int vx_issue_request3(vx_req_base_t *request, int *request_count);
|
|
1748
|
+
|
|
1749
|
+
/**
|
|
1750
|
+
* Get the XML for the given request.
|
|
1751
|
+
*
|
|
1752
|
+
* @param request The request object.
|
|
1753
|
+
* @param xml [out] The XML string.
|
|
1754
|
+
* \ingroup xml
|
|
1755
|
+
*/
|
|
1756
|
+
VIVOXSDK_DLLEXPORT int vx_request_to_xml(void *request, char **xml);
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* Get a request for the given XML string.
|
|
1760
|
+
*
|
|
1761
|
+
* @param xml The XML string.
|
|
1762
|
+
* @param request [out] The request struct.
|
|
1763
|
+
* @param error [out] The XML parse error string (if any error occurs). NULL otherwise.
|
|
1764
|
+
* @return The request struct type. If no struct could be created from the XML, req_none is returned.
|
|
1765
|
+
* \ingroup xml
|
|
1766
|
+
*/
|
|
1767
|
+
VIVOXSDK_DLLEXPORT vx_request_type vx_xml_to_request(const char *xml, void **request, char **error);
|
|
1768
|
+
|
|
1769
|
+
/**
|
|
1770
|
+
* Get the XML for the given response.
|
|
1771
|
+
*
|
|
1772
|
+
* @param response The response object.
|
|
1773
|
+
* @param xml [out] The XML string.
|
|
1774
|
+
* \ingroup xml
|
|
1775
|
+
*/
|
|
1776
|
+
VIVOXSDK_DLLEXPORT int vx_response_to_xml(void *response, char **xml);
|
|
1777
|
+
|
|
1778
|
+
/**
|
|
1779
|
+
* Get a response for the given XML string.
|
|
1780
|
+
*
|
|
1781
|
+
* @param xml The XML string.
|
|
1782
|
+
* @param response [out] The response struct.
|
|
1783
|
+
* @param error [out] The XML parse error string (if any error occurs). NULL otherwise.
|
|
1784
|
+
* @return The response struct type. If no struct could be created from the XML, resp_none is returned.
|
|
1785
|
+
* \ingroup xml
|
|
1786
|
+
*/
|
|
1787
|
+
VIVOXSDK_DLLEXPORT vx_response_type vx_xml_to_response(const char *xml, void **response, char **error);
|
|
1788
|
+
|
|
1789
|
+
/**
|
|
1790
|
+
* Get the XML for the given event.
|
|
1791
|
+
*
|
|
1792
|
+
* @param event The event object.
|
|
1793
|
+
* @param xml [out] The XML string.
|
|
1794
|
+
* \ingroup xml
|
|
1795
|
+
*/
|
|
1796
|
+
VIVOXSDK_DLLEXPORT int vx_event_to_xml(void *event, char **xml);
|
|
1797
|
+
|
|
1798
|
+
/**
|
|
1799
|
+
* Get a event for the given XML string.
|
|
1800
|
+
*
|
|
1801
|
+
* @param xml The XML string.
|
|
1802
|
+
* @param event [out] The event struct.
|
|
1803
|
+
* @param error [out] The XML parse error string (if any error occurs). NULL otherwise.
|
|
1804
|
+
* @return The event struct type. If no struct could be created from the XML, req_none is returned.
|
|
1805
|
+
* \ingroup xml
|
|
1806
|
+
*/
|
|
1807
|
+
VIVOXSDK_DLLEXPORT vx_event_type vx_xml_to_event(const char *xml, void **event, char **error);
|
|
1808
|
+
|
|
1809
|
+
/**
|
|
1810
|
+
* Determine whether the XML refers to a request, response, or event.
|
|
1811
|
+
* \ingroup xml
|
|
1812
|
+
*/
|
|
1813
|
+
VIVOXSDK_DLLEXPORT vx_message_type vx_get_message_type(const char *xml);
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* Get Millisecond Counter
|
|
1817
|
+
*/
|
|
1818
|
+
VIVOXSDK_DLLEXPORT unsigned long long vx_get_time_ms(void);
|
|
1819
|
+
|
|
1820
|
+
/**
|
|
1821
|
+
* Get Millisecond Counter
|
|
1822
|
+
*/
|
|
1823
|
+
VIVOXSDK_DLLEXPORT unsigned long long vx_get_time_milli_seconds(void);
|
|
1824
|
+
|
|
1825
|
+
/**
|
|
1826
|
+
* Get Microsecond Counter
|
|
1827
|
+
*/
|
|
1828
|
+
VIVOXSDK_DLLEXPORT unsigned long long vx_get_time_micro_seconds(void);
|
|
1829
|
+
|
|
1830
|
+
/**
|
|
1831
|
+
* Sleep for the specified number of milliseconds.
|
|
1832
|
+
*
|
|
1833
|
+
* @param milli_seconds [in] Duration to sleep in milliseconds.
|
|
1834
|
+
* @return The difference between the actual and the specified sleep time in milliseconds.
|
|
1835
|
+
*/
|
|
1836
|
+
VIVOXSDK_DLLEXPORT long long vx_sleep_milli_seconds(unsigned long long milli_seconds);
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
* Register a callback that is called when a message is placed in the queue.
|
|
1840
|
+
* The application should use this to signal the main application thread that will then wakeup and call vx_get_message;
|
|
1841
|
+
* \ingroup messaging
|
|
1842
|
+
*/
|
|
1843
|
+
VIVOXSDK_DLLEXPORT int vx_register_message_notification_handler(void (*pf_handler)(void *), void *cookie);
|
|
1844
|
+
|
|
1845
|
+
/**
|
|
1846
|
+
* Unregister a notification handler.
|
|
1847
|
+
* \ingroup messaging
|
|
1848
|
+
*/
|
|
1849
|
+
VIVOXSDK_DLLEXPORT int vx_unregister_message_notification_handler(void (*pf_handler)(void *), void *cookie);
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* Block the caller until a message is available.
|
|
1853
|
+
* Returns NULL if no message was available within the allotted time.
|
|
1854
|
+
* \ingroup messaging
|
|
1855
|
+
*/
|
|
1856
|
+
VIVOXSDK_DLLEXPORT vx_message_base_t *vx_wait_for_message(int msTimeout);
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
*
|
|
1860
|
+
* Register a callback that is called to initialize logging.
|
|
1861
|
+
* The application should use this to signal the main application thread that will then wakeup and call vx_get_message;
|
|
1862
|
+
* \ingroup diagnostics
|
|
1863
|
+
*/
|
|
1864
|
+
VIVOXSDK_DLLEXPORT int vx_register_logging_initialization(
|
|
1865
|
+
vx_log_type log_type,
|
|
1866
|
+
const char *log_folder,
|
|
1867
|
+
const char *log_filename_prefix,
|
|
1868
|
+
const char *log_filename_suffix,
|
|
1869
|
+
int log_level,
|
|
1870
|
+
void (*pf_handler)(const char *source, const char *level, const char *message));
|
|
1871
|
+
|
|
1872
|
+
/**
|
|
1873
|
+
* \deprecated File logging is not supported.
|
|
1874
|
+
* Get the SDK log file path.
|
|
1875
|
+
* \ingroup diagnostics
|
|
1876
|
+
* @deprecated
|
|
1877
|
+
*/
|
|
1878
|
+
VIVOXSDK_DLLEXPORT char *vx_get_log_file_path(void);
|
|
1879
|
+
|
|
1880
|
+
/**
|
|
1881
|
+
* Unregister the logging callback notification handler.
|
|
1882
|
+
* Because the parameters are reserved for future use, pass NULL for each of the parameters
|
|
1883
|
+
* (for example: vx_unregister_logging_handler(0, 0);).
|
|
1884
|
+
* If a logging handler is registered, then it must be unregistered before shutting down the SDK.
|
|
1885
|
+
* \ingroup diagnostics
|
|
1886
|
+
*
|
|
1887
|
+
* @param pf_handler - OBSOLETE AND UNUSED
|
|
1888
|
+
* @param cookie - OBSOLETE AND UNUSED
|
|
1889
|
+
*/
|
|
1890
|
+
VIVOXSDK_DLLEXPORT int vx_unregister_logging_handler(void (*pf_handler)(void *), void *cookie);
|
|
1891
|
+
|
|
1892
|
+
VIVOXSDK_DLLEXPORT int vx_create_account(const char *acct_mgmt_server, const char *admin_name, const char *admin_pw, const char *uname, const char *pw);
|
|
1893
|
+
|
|
1894
|
+
/**
|
|
1895
|
+
* The number of crash dumps stored on disk.
|
|
1896
|
+
* \ingroup diagnostics
|
|
1897
|
+
*
|
|
1898
|
+
* \note Not supported on mobile or console platforms.
|
|
1899
|
+
*/
|
|
1900
|
+
VIVOXSDK_DLLEXPORT int vx_get_crash_dump_count(void);
|
|
1901
|
+
|
|
1902
|
+
/**
|
|
1903
|
+
* Enable crash dump generation.
|
|
1904
|
+
* \ingroup diagnostics
|
|
1905
|
+
*
|
|
1906
|
+
* \note Not supported on mobile or console platforms.
|
|
1907
|
+
*/
|
|
1908
|
+
VIVOXSDK_DLLEXPORT int vx_set_crash_dump_generation_enabled(int value);
|
|
1909
|
+
|
|
1910
|
+
/**
|
|
1911
|
+
* Determine if crash dump generation is enabled.
|
|
1912
|
+
* \ingroup diagnostics
|
|
1913
|
+
*
|
|
1914
|
+
* \note Not supported on mobile or console platforms.
|
|
1915
|
+
*/
|
|
1916
|
+
VIVOXSDK_DLLEXPORT int vx_get_crash_dump_generation(void);
|
|
1917
|
+
|
|
1918
|
+
/**
|
|
1919
|
+
* Get the Base64-encoded crash dump information.
|
|
1920
|
+
* \ingroup diagnostics
|
|
1921
|
+
*
|
|
1922
|
+
* \note Not supported on mobile or console platforms.
|
|
1923
|
+
*/
|
|
1924
|
+
VIVOXSDK_DLLEXPORT char *vx_read_crash_dump(int index);
|
|
1925
|
+
|
|
1926
|
+
/**
|
|
1927
|
+
* Get the timestamp of a crash.
|
|
1928
|
+
* \ingroup diagnostics
|
|
1929
|
+
*
|
|
1930
|
+
* \note Not supported on mobile or console platforms.
|
|
1931
|
+
*/
|
|
1932
|
+
VIVOXSDK_DLLEXPORT time_t vx_get_crash_dump_timestamp(int index);
|
|
1933
|
+
|
|
1934
|
+
/**
|
|
1935
|
+
* Delete the crash dump.
|
|
1936
|
+
* \ingroup diagnostics
|
|
1937
|
+
*
|
|
1938
|
+
* \note Not supported on mobile or console platforms.
|
|
1939
|
+
*/
|
|
1940
|
+
VIVOXSDK_DLLEXPORT int vx_delete_crash_dump(int index);
|
|
1941
|
+
|
|
1942
|
+
/**
|
|
1943
|
+
* Some applications may need to call this routine before exiting.
|
|
1944
|
+
*
|
|
1945
|
+
* \note Applications must call vx_uninitialize() before calling this routine.
|
|
1946
|
+
* \attention PC, console, and mobile applications are not required to call this routine because it has no effect for applications on these platforms.
|
|
1947
|
+
* \ingroup memorymanagement
|
|
1948
|
+
*/
|
|
1949
|
+
VIVOXSDK_DLLEXPORT int vx_on_application_exit(void);
|
|
1950
|
+
|
|
1951
|
+
/**
|
|
1952
|
+
* Get the SDK version info.
|
|
1953
|
+
* \ingroup diagnostics
|
|
1954
|
+
*/
|
|
1955
|
+
VIVOXSDK_DLLEXPORT const char *vx_get_sdk_version_info(void);
|
|
1956
|
+
|
|
1957
|
+
/**
|
|
1958
|
+
* Get the SDK extended version info.
|
|
1959
|
+
* \ingroup diagnostics
|
|
1960
|
+
*/
|
|
1961
|
+
VIVOXSDK_DLLEXPORT const char *vx_get_sdk_version_info_ex(void);
|
|
1962
|
+
|
|
1963
|
+
/**
|
|
1964
|
+
* Apply a Vivox voice font to a .wav file.
|
|
1965
|
+
*
|
|
1966
|
+
* @param fontDefinition - A string that contains the font "definition" in XML format.
|
|
1967
|
+
* @param inputFile - A string that contains the path to the input .wav file, which contains the "unmodified" voice.
|
|
1968
|
+
* @param outputFile - A string that contains the path to the output .wav file with the font applied.
|
|
1969
|
+
* @return - 0 if successful, non-zero if failed.
|
|
1970
|
+
* \ingroup voicefonts
|
|
1971
|
+
*/
|
|
1972
|
+
VIVOXSDK_DLLEXPORT int vx_apply_font_to_file(const char *fontDefinition, const char *inputFile, const char *outputFile);
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* Apply a Vivox voice font to a .wav file and return the energy ratio (Output Energy/Input Energy).
|
|
1976
|
+
*
|
|
1977
|
+
* @param fontDefinition - A string that contains the font "definition" in XML format.
|
|
1978
|
+
* @param inputFile - A string that contains the path to the input .wav file, which contains the "unmodified" voice.
|
|
1979
|
+
* @param outputFile - A string that contains the path to the output .wav file with the font applied.
|
|
1980
|
+
* @param energyRatio - The Raw Energy ratio between the input and output audio.
|
|
1981
|
+
* @return - 0 if successful, non-zero if failed.
|
|
1982
|
+
* \ingroup voicefonts
|
|
1983
|
+
*/
|
|
1984
|
+
VIVOXSDK_DLLEXPORT int vx_apply_font_to_file_return_energy_ratio(const char *fontDefinition, const char *inputFile, const char *outputFile, double *energyRatio);
|
|
1985
|
+
|
|
1986
|
+
/**
|
|
1987
|
+
* Apply a Vivox voice font to a .vxz file and return the energy ratio (Output Energy/Input Energy)
|
|
1988
|
+
*
|
|
1989
|
+
* @param fontDefinition - A string that contains the font "definition" in XML format.
|
|
1990
|
+
* @param inputFile - A string that contains the path to the input .vxz file, which contans the "unmodified" voice.
|
|
1991
|
+
* @param outputFile - A string that contains the path to the output .wav file with the font applied.
|
|
1992
|
+
* @param energyRatio - The Raw Energy ratio between the input and output audio.
|
|
1993
|
+
* @return - 0 if successful, non-zero if failed.
|
|
1994
|
+
* \ingroup voicefonts
|
|
1995
|
+
*/
|
|
1996
|
+
VIVOXSDK_DLLEXPORT int vx_apply_font_to_vxz_file_return_energy_ratio(const char *fontDefinition, const char *inputFile, const char *outputFile, double *energyRatio);
|
|
1997
|
+
|
|
1998
|
+
/**
|
|
1999
|
+
* Create a copy of the internal local audio buffer associated with the vx_req_aux_start_buffer_capture_t request/response.
|
|
2000
|
+
*
|
|
2001
|
+
* @param audioBufferPtr - A void pointer that should be passed in uninitialized.
|
|
2002
|
+
* @return - No return value is provided. On success, the audioBufferPtr will point to a copy of the internal audio buffer. Otherwise, audioBufferPtr is set to NULL.
|
|
2003
|
+
* \see vx_req_aux_start_buffer_capture
|
|
2004
|
+
* \ingroup adi
|
|
2005
|
+
*/
|
|
2006
|
+
VIVOXSDK_DLLEXPORT void *vx_copy_audioBuffer(void *audioBufferPtr);
|
|
2007
|
+
|
|
2008
|
+
/**
|
|
2009
|
+
* Get the duration of the audio buffer in seconds.
|
|
2010
|
+
*
|
|
2011
|
+
* @param audioBufferPtr - A void pointer that should be passed in uninitialized.
|
|
2012
|
+
* @return - The duration of the audio buffer in seconds.
|
|
2013
|
+
* \see vx_req_aux_start_buffer_capture
|
|
2014
|
+
* \ingroup adi
|
|
2015
|
+
*/
|
|
2016
|
+
VIVOXSDK_DLLEXPORT double vx_get_audioBuffer_duration(void *audioBufferPtr);
|
|
2017
|
+
|
|
2018
|
+
/**
|
|
2019
|
+
* Get the sample rate of the audio buffer.
|
|
2020
|
+
*
|
|
2021
|
+
* @param audioBufferPtr - A pointer to audio data in a Vivox proprietary format.
|
|
2022
|
+
* @return - The sample rate of the buffer's data. 0 if the buffer does not exist.
|
|
2023
|
+
* \see vx_req_aux_start_buffer_capture
|
|
2024
|
+
* \ingroup adi
|
|
2025
|
+
*/
|
|
2026
|
+
VIVOXSDK_DLLEXPORT int vx_get_audioBuffer_sample_rate(void *audioBufferPtr);
|
|
2027
|
+
|
|
2028
|
+
/**
|
|
2029
|
+
* Free up all memory associated with an allocated Vivox audioBufferPtr.
|
|
2030
|
+
* Generated by the vx_copy_audioBuffer() call.
|
|
2031
|
+
*
|
|
2032
|
+
* @param audioBufferPtr - A pointer to audio data in a Vivox proprietary format.
|
|
2033
|
+
* \ingroup adi
|
|
2034
|
+
*/
|
|
2035
|
+
VIVOXSDK_DLLEXPORT int vx_free_audioBuffer(void **audioBufferPtr);
|
|
2036
|
+
|
|
2037
|
+
/**
|
|
2038
|
+
* Export audio data in an audioBufferPtr to a memory buffer as PCM.
|
|
2039
|
+
*
|
|
2040
|
+
* @param audioBufferPtr - A pointer to audio data in a Vivox proprietary format.
|
|
2041
|
+
* @param pcmBuffer - A pointer to the pre-allocated memory buffer.
|
|
2042
|
+
* @param maxSamples - The length of the buffer in samples.
|
|
2043
|
+
* @return - The number of samples copied to the buffer. -1 if failed.
|
|
2044
|
+
* \ingroup adi
|
|
2045
|
+
*/
|
|
2046
|
+
VIVOXSDK_DLLEXPORT int vx_export_audioBuffer_to_pcm(void *audioBufferPtr, short *pcmBuffer, int maxSamples);
|
|
2047
|
+
|
|
2048
|
+
/**
|
|
2049
|
+
* Export audio data in an audioBufferPtr to a .wav file.
|
|
2050
|
+
*
|
|
2051
|
+
* @param audioBufferPtr - A pointer to audio data in a Vivox proprietary format.
|
|
2052
|
+
* @param outputFile - A string that contains the path to the output .wav file.
|
|
2053
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2054
|
+
* \ingroup adi
|
|
2055
|
+
*/
|
|
2056
|
+
VIVOXSDK_DLLEXPORT int vx_export_audioBuffer_to_wav_file(void *audioBufferPtr, const char *outputFile);
|
|
2057
|
+
|
|
2058
|
+
/**
|
|
2059
|
+
* Export audio data in an audioBufferPtr to memory.
|
|
2060
|
+
*
|
|
2061
|
+
* @param audioBufferPtr - A pointer to audio data in a Vivox proprietary format.
|
|
2062
|
+
* @param audioBufferOut - An interleaved (if stereo) audio buffer of PCM-encoded audio. Note that this must be freed with vx_free().
|
|
2063
|
+
* @param nSamplesOut - The number of samples.
|
|
2064
|
+
* @param sampleRateOut - The sample rate of the audio buffer.
|
|
2065
|
+
* @param nChannelsOut - The number of channels in the buffer.
|
|
2066
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2067
|
+
* \ingroup adi
|
|
2068
|
+
*/
|
|
2069
|
+
VIVOXSDK_DLLEXPORT int vx_export_audioBuffer_to_memory(void *audioBufferPtr, short **audioBufferOut, int *nSamplesOut, int *sampleRateOut, int *nChannelsOut);
|
|
2070
|
+
|
|
2071
|
+
/**
|
|
2072
|
+
* Set the default out of process server address.
|
|
2073
|
+
* When an address is set, requests issued by using vx_issue_request are sent to the server
|
|
2074
|
+
* at the supplied address instead of being handled in the current process context.
|
|
2075
|
+
*
|
|
2076
|
+
* @param address - The address of the out of process server. Use "127.0.0.1" for most applications.
|
|
2077
|
+
* @param port - port - Use 44125 for most applications.
|
|
2078
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2079
|
+
* \ingroup messaging
|
|
2080
|
+
*/
|
|
2081
|
+
VIVOXSDK_DLLEXPORT int vx_set_out_of_process_server_address(const char *address, unsigned short port);
|
|
2082
|
+
|
|
2083
|
+
/**
|
|
2084
|
+
* \deprecated Use vx_initialize3() instead.
|
|
2085
|
+
* An application must call this API before calling any other Vivox API.
|
|
2086
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2087
|
+
* @deprecated
|
|
2088
|
+
*/
|
|
2089
|
+
VIVOXSDK_DLLEXPORT int vx_initialize(void);
|
|
2090
|
+
|
|
2091
|
+
/**
|
|
2092
|
+
* An application must call this API before calling any other Vivox API, except vx_get_default_config3();
|
|
2093
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2094
|
+
* \ingroup initialization
|
|
2095
|
+
*/
|
|
2096
|
+
VIVOXSDK_DLLEXPORT int vx_initialize3(vx_sdk_config_t *config, size_t config_size);
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* Check if the Vivox SDK was initialized with an vx_initialize3() call, and not yet uninitialized with an vx_uninitialize() call.
|
|
2100
|
+
* @return - 0 if not initialized, non-zero if initialized.
|
|
2101
|
+
* \ingroup initialization
|
|
2102
|
+
*/
|
|
2103
|
+
VIVOXSDK_DLLEXPORT int vx_is_initialized(void);
|
|
2104
|
+
|
|
2105
|
+
/**
|
|
2106
|
+
* An application must call this API before calling any other Vivox API.
|
|
2107
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2108
|
+
* \ingroup initialization
|
|
2109
|
+
*/
|
|
2110
|
+
VIVOXSDK_DLLEXPORT int vx_get_default_config3(vx_sdk_config_t *config, size_t config_size);
|
|
2111
|
+
|
|
2112
|
+
/**
|
|
2113
|
+
* An application must call this before exit.
|
|
2114
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2115
|
+
* \ingroup initialization
|
|
2116
|
+
*/
|
|
2117
|
+
VIVOXSDK_DLLEXPORT int vx_uninitialize(void);
|
|
2118
|
+
#endif
|
|
2119
|
+
|
|
2120
|
+
#define VIVOX_V_V2_AUDIO_DATA_MONO_SIREN14_32000_EXPANDED 0x10001
|
|
2121
|
+
|
|
2122
|
+
/**
|
|
2123
|
+
* \deprecated Use VIVOX_V_V2_AUDIO_DATA_MONO_SIREN14_32000_EXPANDED instead of VIVOX_V_V2_AUDIO_DATA_MONO_SIREN14_32000.
|
|
2124
|
+
* @deprecated
|
|
2125
|
+
*/
|
|
2126
|
+
#define VIVOX_V_V2_AUDIO_DATA_MONO_SIREN14_32000 VIVOX_V_V2_AUDIO_DATA_MONO_SIREN14_32000_EXPANDED
|
|
2127
|
+
|
|
2128
|
+
#define VIVOX_V_V2_AUDIO_DATA_MONO_SIREN7_16000_EXPANDED 0x10008
|
|
2129
|
+
|
|
2130
|
+
#define VIVOX_V_V2_AUDIO_DATA_MONO_OPUS_48000_EXPANDED 0x10009
|
|
2131
|
+
|
|
2132
|
+
/**
|
|
2133
|
+
* The configured_codecs field in vx_req_connector_create is a mask of these constants.
|
|
2134
|
+
*/
|
|
2135
|
+
#define VIVOX_VANI_SIREN7 0x2 /* Siren7, 16kHz, 32kbps */
|
|
2136
|
+
#define VIVOX_VANI_SIREN14 0x4 /* Siren14, 32kHz, 32kbps */
|
|
2137
|
+
#define VIVOX_VANI_LEGACY_MASK 0x6
|
|
2138
|
+
#define VIVOX_VANI_OPUS8 0x10 /* Opus, 48kHz, 8kbps */
|
|
2139
|
+
#define VIVOX_VANI_OPUS40 0x20 /* Opus, 48kHz, 40kbps */
|
|
2140
|
+
#define VIVOX_VANI_OPUS57 0x40 /* Opus, 48kHz, 57kbps */ /* proposed; pending research */
|
|
2141
|
+
#define VIVOX_VANI_OPUS72 0x80 /* Opus, 48kHz, 72kbps */ /* proposed; pending research */
|
|
2142
|
+
#define VIVOX_VANI_OPUS VIVOX_VANI_OPUS40
|
|
2143
|
+
#define VIVOX_VANI_OPUS_MASK 0xf0
|
|
2144
|
+
|
|
2145
|
+
/**
|
|
2146
|
+
* \deprecated PCMU functionality has been removed. Please discontinue use.
|
|
2147
|
+
* @deprecated
|
|
2148
|
+
*/
|
|
2149
|
+
#define VIVOX_VANI_PCMU VX_DEPRECATED_MACRO(VIVOX_VANI_PCMU, 5.19) VIVOX_VANI_OPUS8
|
|
2150
|
+
|
|
2151
|
+
/**
|
|
2152
|
+
* The configured_codecs field in vx_req_connector_create is a mask of these constants.
|
|
2153
|
+
*/
|
|
2154
|
+
typedef enum {
|
|
2155
|
+
vx_codec_siren7 = VIVOX_VANI_SIREN7, /* Siren7, 16kHz, 32kbps */
|
|
2156
|
+
vx_codec_siren14 = VIVOX_VANI_SIREN14, /* Siren14, 32kHz, 32kbps */
|
|
2157
|
+
vx_codec_opus8 = VIVOX_VANI_OPUS8, /* Opus, 48kHz, 8kbps */
|
|
2158
|
+
vx_codec_opus40 = VIVOX_VANI_OPUS40, /* Opus, 48kHz, 40kbps -- recommended Opus default */
|
|
2159
|
+
vx_codec_opus57 = VIVOX_VANI_OPUS57, /* Opus, 48kHz, 57kbps -- proposed; pending research */
|
|
2160
|
+
vx_codec_opus72 = VIVOX_VANI_OPUS72, /* Opus, 48kHz, 72kbps -- proposed; pending research */
|
|
2161
|
+
|
|
2162
|
+
VX_DEPRECATED_ENUM_GCC(vx_codec_pcmu, 5.19) = VIVOX_VANI_OPUS8 /* PCMU functionality has been removed */
|
|
2163
|
+
} vx_codec;
|
|
2164
|
+
VX_DEPRECATED_ENUM_MSC(vx_codec_pcmu)
|
|
2165
|
+
|
|
2166
|
+
typedef struct vx_stat_sample {
|
|
2167
|
+
double sample_count;
|
|
2168
|
+
double sum;
|
|
2169
|
+
double sum_of_squares;
|
|
2170
|
+
double mean;
|
|
2171
|
+
double stddev;
|
|
2172
|
+
double min;
|
|
2173
|
+
double max;
|
|
2174
|
+
double last;
|
|
2175
|
+
} vx_stat_sample_t;
|
|
2176
|
+
|
|
2177
|
+
typedef struct vx_stat_thread {
|
|
2178
|
+
int interval;
|
|
2179
|
+
int count_poll_lt_1ms;
|
|
2180
|
+
int count_poll_lt_5ms;
|
|
2181
|
+
int count_poll_lt_10ms;
|
|
2182
|
+
int count_poll_lt_16ms;
|
|
2183
|
+
int count_poll_lt_20ms;
|
|
2184
|
+
int count_poll_lt_25ms;
|
|
2185
|
+
int count_poll_gte_25ms;
|
|
2186
|
+
} vx_stat_thread_t;
|
|
2187
|
+
|
|
2188
|
+
typedef struct vx_system_stats {
|
|
2189
|
+
int ss_size;
|
|
2190
|
+
int ar_source_count;
|
|
2191
|
+
int ar_source_queue_limit;
|
|
2192
|
+
int ar_source_queue_overflows;
|
|
2193
|
+
int ar_source_poll_count;
|
|
2194
|
+
unsigned msgovrld_count;
|
|
2195
|
+
vx_stat_sample_t ar_source_free_buffers;
|
|
2196
|
+
vx_stat_sample_t ar_source_queue_depth;
|
|
2197
|
+
vx_stat_thread_t vp_thread;
|
|
2198
|
+
vx_stat_thread_t ticker_thread;
|
|
2199
|
+
|
|
2200
|
+
/**
|
|
2201
|
+
* VivoxClient::Client instance count.
|
|
2202
|
+
* \note V5 only. In V4, this is always equal to -1.
|
|
2203
|
+
*/
|
|
2204
|
+
int clnt_count;
|
|
2205
|
+
|
|
2206
|
+
/**
|
|
2207
|
+
* LoginContext instance count.
|
|
2208
|
+
* \note V5 only. In V4, this is always equal to -1.
|
|
2209
|
+
*/
|
|
2210
|
+
int lc_count;
|
|
2211
|
+
|
|
2212
|
+
/**
|
|
2213
|
+
* MorpheusSession instance count.
|
|
2214
|
+
* \note V5 only. In V4, this is always equal to -1.
|
|
2215
|
+
*/
|
|
2216
|
+
int mps_count;
|
|
2217
|
+
|
|
2218
|
+
/**
|
|
2219
|
+
* MorpheusSessionGroup instance count.
|
|
2220
|
+
* \note V5 only. In V4, this is always equal to -1.
|
|
2221
|
+
*/
|
|
2222
|
+
int mpsg_count;
|
|
2223
|
+
|
|
2224
|
+
/**
|
|
2225
|
+
* VivoxStro::StroMediaSession instance count.
|
|
2226
|
+
* \note V5 only. In V4, this is always equal to -1.
|
|
2227
|
+
*/
|
|
2228
|
+
int strms_count;
|
|
2229
|
+
|
|
2230
|
+
/**
|
|
2231
|
+
* VivoxStro::StroRtp instance count.
|
|
2232
|
+
* \note V5 only. In V4, this is always equal to -1.
|
|
2233
|
+
*/
|
|
2234
|
+
int strr_count;
|
|
2235
|
+
|
|
2236
|
+
/**
|
|
2237
|
+
* VivoxStro::StroSessionState instance count.
|
|
2238
|
+
* \note V5 only. In V4, this is always equal to -1.
|
|
2239
|
+
*/
|
|
2240
|
+
int strss_count;
|
|
2241
|
+
|
|
2242
|
+
/**
|
|
2243
|
+
* VoiceProcessor instance count.
|
|
2244
|
+
* \note V5 only. In V4, this is always equal to -1.
|
|
2245
|
+
*/
|
|
2246
|
+
int vp_count;
|
|
2247
|
+
} vx_system_stats_t;
|
|
2248
|
+
|
|
2249
|
+
/**
|
|
2250
|
+
* Indicates the state of the application.
|
|
2251
|
+
* \note Valid only on mobile platforms.
|
|
2252
|
+
*/
|
|
2253
|
+
typedef enum vx_application_state_notification_type {
|
|
2254
|
+
vx_application_state_notification_type_before_background = 0,
|
|
2255
|
+
vx_application_state_notification_type_after_foreground = 1,
|
|
2256
|
+
vx_application_state_notification_type_periodic_background_idle = 2
|
|
2257
|
+
} vx_application_state_notification_type_t;
|
|
2258
|
+
|
|
2259
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
2260
|
+
VIVOXSDK_DLLEXPORT int vx_debug_call(void *);
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* Get statistics about various system internals.
|
|
2264
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2265
|
+
*/
|
|
2266
|
+
VIVOXSDK_DLLEXPORT int vx_get_system_stats(vx_system_stats_t *system_stats);
|
|
2267
|
+
|
|
2268
|
+
#define VX_VAR_DECODER_COUNT_LIMIT "DecoderLimit"
|
|
2269
|
+
#define VX_VAR_DECODER_HANGOVER_LIMIT "DecoderHangoverLimit"
|
|
2270
|
+
#define VX_VAR_RTP_ENCRYPTION "RTPEncryption"
|
|
2271
|
+
|
|
2272
|
+
/**
|
|
2273
|
+
* Get named variables.
|
|
2274
|
+
* @param var_name - The name of the variable.
|
|
2275
|
+
* @param p_value - Where to store the value of the variable.
|
|
2276
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2277
|
+
*/
|
|
2278
|
+
VIVOXSDK_DLLEXPORT int vx_get_int_var(const char *var_name, int *p_value);
|
|
2279
|
+
|
|
2280
|
+
/**
|
|
2281
|
+
* Set named variables.
|
|
2282
|
+
* @param var_name - The name of the variable.
|
|
2283
|
+
* @param - The integer value to set.
|
|
2284
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2285
|
+
*/
|
|
2286
|
+
VIVOXSDK_DLLEXPORT int vx_set_int_var(const char *var_name, int value);
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* Deallocate any message of any type.
|
|
2290
|
+
* \ingroup memorymanagement
|
|
2291
|
+
*/
|
|
2292
|
+
VIVOXSDK_DLLEXPORT int vx_destroy_message(vx_message_base_t *message);
|
|
2293
|
+
#endif
|
|
2294
|
+
|
|
2295
|
+
/**
|
|
2296
|
+
* Error codes that are returned by the VXA subsystem.
|
|
2297
|
+
*/
|
|
2298
|
+
typedef enum {
|
|
2299
|
+
/**
|
|
2300
|
+
* Method executed successfully.
|
|
2301
|
+
*/
|
|
2302
|
+
VXA_SUCCESS = 0,
|
|
2303
|
+
|
|
2304
|
+
/**
|
|
2305
|
+
* The caller provided an invalid parameter.
|
|
2306
|
+
*/
|
|
2307
|
+
VXA_INVALID_PARAMETER = 1,
|
|
2308
|
+
|
|
2309
|
+
/**
|
|
2310
|
+
* The caller attempted to open a device that does not exist.
|
|
2311
|
+
*/
|
|
2312
|
+
VXA_DEVICE_DOES_NOT_EXIST = 2,
|
|
2313
|
+
|
|
2314
|
+
/**
|
|
2315
|
+
* There was an unexpected operating system-specific failure.
|
|
2316
|
+
*/
|
|
2317
|
+
VXA_INTERNAL_ERROR = 3,
|
|
2318
|
+
|
|
2319
|
+
/**
|
|
2320
|
+
* The method could not allocate enough memory to complete the request.
|
|
2321
|
+
*/
|
|
2322
|
+
VXA_OUT_OF_MEMORY = 4,
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* The method attempted to perform an invalid operation on the object in its current state.
|
|
2326
|
+
* Typically, this is an attempt to open an already open device, or to read or write a closed device.
|
|
2327
|
+
* Can also be called if VXA is not initialized.
|
|
2328
|
+
*/
|
|
2329
|
+
VXA_INVALID_STATE = 5,
|
|
2330
|
+
|
|
2331
|
+
/**
|
|
2332
|
+
* Returned by "read()" functions when there is no more data available.
|
|
2333
|
+
*/
|
|
2334
|
+
VXA_NO_MORE_DATA = 6,
|
|
2335
|
+
|
|
2336
|
+
/**
|
|
2337
|
+
* Returned by the method if the feature is not supported.
|
|
2338
|
+
*/
|
|
2339
|
+
VXA_FEATURE_NOT_SUPPORTED = 7,
|
|
2340
|
+
|
|
2341
|
+
/**
|
|
2342
|
+
* Returned by the method if there is an attempt to create more than MAX_VXA_DEVICE_COUNT devices.
|
|
2343
|
+
*/
|
|
2344
|
+
VXA_MAX_DEVICES_EXCEEDED = 8,
|
|
2345
|
+
|
|
2346
|
+
/**
|
|
2347
|
+
* Returned by the method if there are no more render buffers available.
|
|
2348
|
+
*/
|
|
2349
|
+
VXA_NO_BUFFERS_AVAILABLE = 9,
|
|
2350
|
+
|
|
2351
|
+
/**
|
|
2352
|
+
* Returned by the method if the app does not have microphone access permission.
|
|
2353
|
+
*/
|
|
2354
|
+
VXA_ACCESS_DENIED = 10
|
|
2355
|
+
} VXA_ERROR_CODES;
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* Values passed when opening capture devices.
|
|
2359
|
+
*/
|
|
2360
|
+
typedef enum {
|
|
2361
|
+
/**
|
|
2362
|
+
* Use acoustic echo cancellation.
|
|
2363
|
+
* \note This flag is not universally implemented.
|
|
2364
|
+
*/
|
|
2365
|
+
VXA_CAPTURE_OPEN_FLAG_USE_AEC = 0x00000001,
|
|
2366
|
+
|
|
2367
|
+
/**
|
|
2368
|
+
* Use automatic gain control.
|
|
2369
|
+
* \note This flag is not universally implemented.
|
|
2370
|
+
*/
|
|
2371
|
+
VXA_CAPTURE_OPEN_FLAG_USE_AGC = 0x00000002
|
|
2372
|
+
} VXA_CAPTURE_FLAGS;
|
|
2373
|
+
|
|
2374
|
+
/**
|
|
2375
|
+
* The common return code for vxa* methods.
|
|
2376
|
+
*/
|
|
2377
|
+
typedef int vxa_status_t;
|
|
2378
|
+
|
|
2379
|
+
/**
|
|
2380
|
+
* Get statistics that are useful for debugging audio capture issues.
|
|
2381
|
+
*/
|
|
2382
|
+
typedef struct vxa_capture_device_stats_t {
|
|
2383
|
+
int buffer_underrun_count;
|
|
2384
|
+
int buffer_overrun_count;
|
|
2385
|
+
int other_error_count;
|
|
2386
|
+
int audio_queue_read_count; // Correlate with buffer_underrun_count
|
|
2387
|
+
int audio_queue_write_count; // Correlate with buffer_overrun_count
|
|
2388
|
+
} vxa_capture_device_stats_t;
|
|
2389
|
+
|
|
2390
|
+
/**
|
|
2391
|
+
* Get statistics that are useful for debugging audio render issues.
|
|
2392
|
+
*/
|
|
2393
|
+
typedef struct vxa_render_device_stats_t {
|
|
2394
|
+
int current_output_queue_depth_milliseconds;
|
|
2395
|
+
int buffer_underrun_count;
|
|
2396
|
+
int buffer_overrun_count;
|
|
2397
|
+
int other_error_count;
|
|
2398
|
+
int audio_queue_read_count; // Correlate with buffer_underrun_count
|
|
2399
|
+
int audio_queue_write_count; // Correlate with buffer_overrun_count
|
|
2400
|
+
int hardware_output_channels;
|
|
2401
|
+
int hardware_preferred_samplerate;
|
|
2402
|
+
int hardware_preferred_buffer_duration;
|
|
2403
|
+
} vxa_render_device_stats_t;
|
|
2404
|
+
|
|
2405
|
+
/**
|
|
2406
|
+
* The maximum number of application-provided capture devices.
|
|
2407
|
+
* The maximum number of application-provided render devices.
|
|
2408
|
+
*/
|
|
2409
|
+
#define MAX_VXA_DEVICE_COUNT 32
|
|
2410
|
+
|
|
2411
|
+
/**
|
|
2412
|
+
* Rolloff curve types to serve as the distance model for a positional channel.
|
|
2413
|
+
* This tells the server which algorithm to use when computing attenuation.
|
|
2414
|
+
*/
|
|
2415
|
+
typedef enum {
|
|
2416
|
+
/**
|
|
2417
|
+
* No distance-based attenuation is applied.
|
|
2418
|
+
* All speakers are rendered as if they were in the same position as the listener.
|
|
2419
|
+
*/
|
|
2420
|
+
channel_rolloff_curve_type_none = 0,
|
|
2421
|
+
|
|
2422
|
+
/**
|
|
2423
|
+
* The attenuation increases in inverse proportion to the distance.
|
|
2424
|
+
* The rolloff factor is the inverse of the slope of the attenuation curve.
|
|
2425
|
+
*/
|
|
2426
|
+
channel_rolloff_curve_type_inverse_distance_clamped = 1,
|
|
2427
|
+
|
|
2428
|
+
/**
|
|
2429
|
+
* The attenuation increases in linear proportion to the distance.
|
|
2430
|
+
* The rolloff factor is the negative slope of the attenuation curve.
|
|
2431
|
+
*/
|
|
2432
|
+
channel_rolloff_curve_type_linear_distance_clamped = 2,
|
|
2433
|
+
|
|
2434
|
+
/**
|
|
2435
|
+
* The attenuation increases in inverse proportion to the distance
|
|
2436
|
+
* raised to the power of the rolloff factor.
|
|
2437
|
+
*/
|
|
2438
|
+
channel_rolloff_curve_type_exponential_distance_clamped = 3
|
|
2439
|
+
} vx_channel_rolloff_curve_type;
|
|
2440
|
+
|
|
2441
|
+
#ifndef VIVOX_TYPES_ONLY
|
|
2442
|
+
/**
|
|
2443
|
+
* Generate a Vivox Access Token.
|
|
2444
|
+
*
|
|
2445
|
+
* !!! This function should only be called when prototyping or debugging token generation server implementations. !!!
|
|
2446
|
+
* It should not be in production code, because that would require the issuer/key pair to be resident client memory,
|
|
2447
|
+
* which would create a security exposure.
|
|
2448
|
+
*
|
|
2449
|
+
* @param issuer - A standard issuer claim.
|
|
2450
|
+
* @param expiration - A standard expiration time claim. If set to (vx_time_t)-1, uses the default time of now(0)+300.
|
|
2451
|
+
* @param vxa - A Vivox action, for example, "login", "join", "kick", or "mute".
|
|
2452
|
+
* @param serial number - Use this to guarantee uniqueness within an epoch second.
|
|
2453
|
+
* @param subject - Optional: The URI of the target of the actions "kick" and "mute". NULL otherwise.
|
|
2454
|
+
* @param from_uri - A SIP From URI.
|
|
2455
|
+
* @param to_uri - A SIP To URI.
|
|
2456
|
+
* @param key - A token-signing key
|
|
2457
|
+
* @param key_len - The length of the token-signing key.
|
|
2458
|
+
* @returns null-terminated - A buffer to be freed with vx_free(). If NULL is returned, an error occurred.
|
|
2459
|
+
*/
|
|
2460
|
+
VIVOXSDK_DLLEXPORT char *vx_debug_generate_token(const char *issuer, vx_time_t expiration, const char *vxa, unsigned long long serial, const char *subject, const char *from_uri, const char *to_uri, const unsigned char *key, size_t key_len);
|
|
2461
|
+
|
|
2462
|
+
/**
|
|
2463
|
+
* Synchronously download the contents of the specified URL with the GET method.
|
|
2464
|
+
*
|
|
2465
|
+
* @param url - [in] The URL of the resource to download.
|
|
2466
|
+
* @param response_code - [out] A pointer to the returned response code (0 on error, >= 200 after the request finished).
|
|
2467
|
+
* @param content - [out] A pointer to the downloaded content is stored here, and is guaranteed to be NULL-terminated. The memory is allocated automatically. Use vx_free_http() to free up the allocated buffers.
|
|
2468
|
+
* @param content_len - [out] A pointer to the returned content length.
|
|
2469
|
+
* @param content_type - [out] A pointer to the downloaded content type is stored here, and is guaranteed to be NULL-terminated. The memory is allocated automatically. Use vx_free_http() to free up the allocated buffers.
|
|
2470
|
+
* @param content_type_len - [out] A pointer to the returned content type length.
|
|
2471
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2472
|
+
*/
|
|
2473
|
+
VIVOXSDK_DLLEXPORT unsigned int vx_get_http(const char *url, unsigned int *response_code, char **content, size_t *content_len, char **content_type, size_t *content_type_len);
|
|
2474
|
+
|
|
2475
|
+
/**
|
|
2476
|
+
* Free the memory allocated during the vx_get_http() call.
|
|
2477
|
+
* \note Call this function only if vx_get_http() returned zero.
|
|
2478
|
+
*
|
|
2479
|
+
* @param content - [in] The same value as what is passed to vx_get_http().
|
|
2480
|
+
* @param content_type - [in] The same value as what is passed to vx_get_http().
|
|
2481
|
+
*/
|
|
2482
|
+
VIVOXSDK_DLLEXPORT int vx_free_http(char **content, char **content_type);
|
|
2483
|
+
|
|
2484
|
+
/**
|
|
2485
|
+
* Get a random guest user ID with the given prefix.
|
|
2486
|
+
* The returned ID always starts and ends with the '.' character.
|
|
2487
|
+
* \note This must be deallocated with vx_free();
|
|
2488
|
+
*
|
|
2489
|
+
* @param - [in] prefix The prefix for the user.
|
|
2490
|
+
* \ingroup diagnostics
|
|
2491
|
+
*/
|
|
2492
|
+
VIVOXSDK_DLLEXPORT char *vx_get_random_user_id(const char *prefix);
|
|
2493
|
+
|
|
2494
|
+
/**
|
|
2495
|
+
* Get a random guest user ID for the given issuer with the given prefix.
|
|
2496
|
+
* The returned ID always starts and ends with the '.' character.
|
|
2497
|
+
* \note This must be deallocated with vx_free();
|
|
2498
|
+
*
|
|
2499
|
+
* @param prefix - [in] The prefix for the user.
|
|
2500
|
+
* @param issuer - [in, optional] The issuer. If NULL or an empty string is passed, the generated user ID is the same as what is generated by vx_get_random_user_id().
|
|
2501
|
+
* \ingroup diagnostics
|
|
2502
|
+
*/
|
|
2503
|
+
VIVOXSDK_DLLEXPORT char *vx_get_random_user_id_ex(const char *prefix, const char *issuer);
|
|
2504
|
+
|
|
2505
|
+
/**
|
|
2506
|
+
* Get a random ephemeral channel ID with the given prefix for the specific realm.
|
|
2507
|
+
*
|
|
2508
|
+
* The prefix should start with one of the following options:
|
|
2509
|
+
* confctl-g- for general non-positional channels
|
|
2510
|
+
* confctl-e- for echo channels
|
|
2511
|
+
* confctl-d- for positional channels
|
|
2512
|
+
*
|
|
2513
|
+
* \note This must be deallocated with vx_free();
|
|
2514
|
+
*
|
|
2515
|
+
* @param prefix - [in] The prefix for the channel.
|
|
2516
|
+
* @param realm - [in] The realm for that channel (for example, mt1s.vivox.com).
|
|
2517
|
+
* \ingroup diagnostics
|
|
2518
|
+
*/
|
|
2519
|
+
VIVOXSDK_DLLEXPORT char *vx_get_random_channel_uri(const char *prefix, const char *realm);
|
|
2520
|
+
|
|
2521
|
+
/**
|
|
2522
|
+
* Get a random ephemeral channel ID for the given issuer with the given prefix for the specific realm.
|
|
2523
|
+
*
|
|
2524
|
+
* The prefix should start with one of the following options:
|
|
2525
|
+
* confctl-g- for general non-positional channels
|
|
2526
|
+
* confctl-e- for echo channels
|
|
2527
|
+
* confctl-d- for positional channels
|
|
2528
|
+
*
|
|
2529
|
+
* \note This must be deallocated with vx_free();
|
|
2530
|
+
*
|
|
2531
|
+
* @param prefix - [in] The prefix for the channel.
|
|
2532
|
+
* @param realm - [in] The realm for that channel (for example, mt1s.vivox.com).
|
|
2533
|
+
* @param issuer - [in, optional] The issuer. If NULL or an empty string is passed, the generated channel ID is the same as what is generated by vx_get_random_channel_uri().
|
|
2534
|
+
* \ingroup diagnostics
|
|
2535
|
+
*/
|
|
2536
|
+
VIVOXSDK_DLLEXPORT char *vx_get_random_channel_uri_ex(const char *prefix, const char *realm, const char *issuer);
|
|
2537
|
+
|
|
2538
|
+
/**
|
|
2539
|
+
* Generate the fully specified URI of a user with the given name for the given realm and issuer.
|
|
2540
|
+
* \note This must be deallocated with vx_free();
|
|
2541
|
+
*
|
|
2542
|
+
* @param name - [in] The unique account name that you assigned to the user.
|
|
2543
|
+
* @param realm - [in] The realm for that user (for example, mt1s.vivox.com).
|
|
2544
|
+
* @param issuer - [in, optional] The issuer. If NULL or an empty string is passed, the generated user URI is the same as what is generated with no argument.
|
|
2545
|
+
*/
|
|
2546
|
+
VIVOXSDK_DLLEXPORT char *vx_get_user_uri(const char *name, const char *realm, const char *issuer);
|
|
2547
|
+
|
|
2548
|
+
/**
|
|
2549
|
+
* Generate the fully specified URI of an echo channel with the given name for the given realm and issuer.
|
|
2550
|
+
* \note This must be deallocated with vx_free();
|
|
2551
|
+
*
|
|
2552
|
+
* @param name - [in] The name you assigned to the channel.
|
|
2553
|
+
* @param realm - [in] The realm for that channel (for example, mt1s.vivox.com).
|
|
2554
|
+
* @param issuer - [in, optional] The issuer. If NULL or an empty string is passed, the generated user URI is the same as what is generated with no argument.
|
|
2555
|
+
*/
|
|
2556
|
+
VIVOXSDK_DLLEXPORT char *vx_get_echo_channel_uri(const char *name, const char *realm, const char *issuer);
|
|
2557
|
+
|
|
2558
|
+
/**
|
|
2559
|
+
* Generate the fully specified URI of a general non-positional channel with the given name for the given realm and issuer.
|
|
2560
|
+
* \note This must be deallocated with vx_free();
|
|
2561
|
+
*
|
|
2562
|
+
* @param name - [in] The name you assigned to the channel.
|
|
2563
|
+
* @param realm - [in] The realm for that channel (for example, mt1s.vivox.com).
|
|
2564
|
+
* @param issuer - [in, optional] The issuer. If NULL or an empty string is passed, the generated user URI is the same as what is generated with no argument.
|
|
2565
|
+
*/
|
|
2566
|
+
VIVOXSDK_DLLEXPORT char *vx_get_general_channel_uri(const char *name, const char *realm, const char *issuer);
|
|
2567
|
+
|
|
2568
|
+
/**
|
|
2569
|
+
* Generate the fully specified URI of a positional channel with the given name and 3D properties for the given realm and issuer.
|
|
2570
|
+
* \note This must be deallocated with vx_free(); URIs with different 3D properties are considered different channels.
|
|
2571
|
+
*
|
|
2572
|
+
* @param name - [in] The name you assigned to the channel.
|
|
2573
|
+
* @param realm - [in] The realm for that channel (for example, mt1s.vivox.com).
|
|
2574
|
+
* @param max_range - [in] The maximum distance from the listener at which a speaker can be heard. This must be an integer > 0.
|
|
2575
|
+
* @param clamping_distance - [in] The distance from the listener at which a speaker’s voice is heard at its original volume. This must be an integer in the range 0 <= clamping_distance <= max_range.
|
|
2576
|
+
* @param rolloff - [in] The strength of the volume attenuation as the speaker moves away from the listener. This must be a floating point value >= 0 that is rounded to three decimal places.
|
|
2577
|
+
* @param distance_model - [in] The curve that determines volume attenuation at distances between the clamping_distance and max_range, scaled by the rolloff.
|
|
2578
|
+
* @param issuer - [in, optional] The issuer. If NULL or an empty string is passed, the generated user URI is the same as what is generated with no argument.
|
|
2579
|
+
*/
|
|
2580
|
+
VIVOXSDK_DLLEXPORT char *vx_get_positional_channel_uri(const char *name, const char *realm, int max_range, int clamping_distance, double rolloff, vx_channel_rolloff_curve_type distance_model, const char *issuer);
|
|
2581
|
+
|
|
2582
|
+
/**
|
|
2583
|
+
* Return a textual representation of the compositional elements of a Vivox URI, suitable for logging.
|
|
2584
|
+
* For instance, whether it is a user or channel URI, the name, realm, and other properties are listed.
|
|
2585
|
+
* \note This must be deallocated with vx_free(); The string contains line breaks.
|
|
2586
|
+
*
|
|
2587
|
+
* @param is_multitenant - [in] 1 if the URI includes a token issuer, or 0 otherwise.
|
|
2588
|
+
* @param uri - [in] A fully specified URI representing a Vivox user or channel.
|
|
2589
|
+
*/
|
|
2590
|
+
VIVOXSDK_DLLEXPORT char *vx_uri_to_string(int is_multitenant, const char *uri);
|
|
2591
|
+
#endif
|
|
2592
|
+
|
|
2593
|
+
/* Audio Quality Controls functions */
|
|
2594
|
+
/**
|
|
2595
|
+
* Values for OPUS VBR mode.
|
|
2596
|
+
*/
|
|
2597
|
+
typedef enum {
|
|
2598
|
+
/**
|
|
2599
|
+
* A constant bitrate mode.
|
|
2600
|
+
*/
|
|
2601
|
+
opus_mode_cbr = 0,
|
|
2602
|
+
|
|
2603
|
+
/**
|
|
2604
|
+
* A limited variable bitrate mode.
|
|
2605
|
+
* \note The actual bitrate will never exceed the requested bitrate.
|
|
2606
|
+
*/
|
|
2607
|
+
opus_mode_lvbr = 1,
|
|
2608
|
+
|
|
2609
|
+
/**
|
|
2610
|
+
* A variable bitrate mode.
|
|
2611
|
+
*/
|
|
2612
|
+
opus_mode_vbr = 2
|
|
2613
|
+
} vx_opus_vbr_mode;
|
|
2614
|
+
|
|
2615
|
+
/**
|
|
2616
|
+
* Values for OPUS bandwidth.
|
|
2617
|
+
*/
|
|
2618
|
+
typedef enum {
|
|
2619
|
+
/**
|
|
2620
|
+
* Automatic bandwidth (default).
|
|
2621
|
+
*/
|
|
2622
|
+
opus_bandwidth_auto = 0,
|
|
2623
|
+
/**
|
|
2624
|
+
* Narrowband, 4kHz.
|
|
2625
|
+
*/
|
|
2626
|
+
opus_bandwidth_nb = 1,
|
|
2627
|
+
/**
|
|
2628
|
+
* Medium-band, 6kHz.
|
|
2629
|
+
*/
|
|
2630
|
+
opus_bandwidth_mb = 2,
|
|
2631
|
+
/**
|
|
2632
|
+
* Wideband, 8kHz.
|
|
2633
|
+
*/
|
|
2634
|
+
opus_bandwidth_wb = 3,
|
|
2635
|
+
/**
|
|
2636
|
+
* Super-wideband, 12 kHz.
|
|
2637
|
+
*/
|
|
2638
|
+
opus_bandwidth_swb = 4,
|
|
2639
|
+
/**
|
|
2640
|
+
* Fullband, 20 kHz.
|
|
2641
|
+
*/
|
|
2642
|
+
opus_bandwidth_fb = 5
|
|
2643
|
+
} vx_opus_bandwidth;
|
|
2644
|
+
|
|
2645
|
+
/**
|
|
2646
|
+
* Set the bitrate for all OPUS encoders.
|
|
2647
|
+
*
|
|
2648
|
+
* @param bits_per_second - [in] The requested bitrate, 6000-128000 bit/s.
|
|
2649
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2650
|
+
*/
|
|
2651
|
+
VIVOXSDK_DLLEXPORT int vx_opus_set_bit_rate(int bits_per_second);
|
|
2652
|
+
|
|
2653
|
+
/**
|
|
2654
|
+
* Get the current OPUS bitrate.
|
|
2655
|
+
*
|
|
2656
|
+
* @param p_bits_per_second - [out] A pointer to the returned value.
|
|
2657
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2658
|
+
*/
|
|
2659
|
+
VIVOXSDK_DLLEXPORT int vx_opus_get_bit_rate(int *p_bits_per_second);
|
|
2660
|
+
|
|
2661
|
+
/**
|
|
2662
|
+
* Set the complexity for all OPUS encoders.
|
|
2663
|
+
*
|
|
2664
|
+
* @param complexity - [in] The requested complexity, 0-10.
|
|
2665
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2666
|
+
*/
|
|
2667
|
+
VIVOXSDK_DLLEXPORT int vx_opus_set_complexity(int complexity);
|
|
2668
|
+
|
|
2669
|
+
/**
|
|
2670
|
+
* Get the current OPUS complexity.
|
|
2671
|
+
*
|
|
2672
|
+
* @param p_complexity - [out] A pointer to the returned value.
|
|
2673
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2674
|
+
*/
|
|
2675
|
+
VIVOXSDK_DLLEXPORT int vx_opus_get_complexity(int *p_complexity);
|
|
2676
|
+
|
|
2677
|
+
/**
|
|
2678
|
+
* Set the VBR mode for all OPUS encoders.
|
|
2679
|
+
*
|
|
2680
|
+
* @param vbr_mode - [in] The requested mode (vx_opus_vbr_mode).
|
|
2681
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2682
|
+
*/
|
|
2683
|
+
VIVOXSDK_DLLEXPORT int vx_opus_set_vbr_mode(int vbr_mode);
|
|
2684
|
+
|
|
2685
|
+
/**
|
|
2686
|
+
* Get the current OPUS VBR mode.
|
|
2687
|
+
*
|
|
2688
|
+
* @param p_vbr_mode - [out] A pointer to the returned value (vx_opus_vbr_mode).
|
|
2689
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2690
|
+
*/
|
|
2691
|
+
VIVOXSDK_DLLEXPORT int vx_opus_get_vbr_mode(int *p_vbr_mode);
|
|
2692
|
+
|
|
2693
|
+
/**
|
|
2694
|
+
* Set the bandwidth for all OPUS encoders.
|
|
2695
|
+
*
|
|
2696
|
+
* @param bandwidth - [in] The requested bandwidth (vx_opus_bandwidth).
|
|
2697
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2698
|
+
*/
|
|
2699
|
+
VIVOXSDK_DLLEXPORT int vx_opus_set_bandwidth(int bandwidth);
|
|
2700
|
+
|
|
2701
|
+
/**
|
|
2702
|
+
* Get the current OPUS bandwidth.
|
|
2703
|
+
*
|
|
2704
|
+
* @param p_bandwidth - [out] A pointer to the returned value (vx_opus_bandwidth).
|
|
2705
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2706
|
+
*/
|
|
2707
|
+
VIVOXSDK_DLLEXPORT int vx_opus_get_bandwidth(int *p_bandwidth);
|
|
2708
|
+
|
|
2709
|
+
/**
|
|
2710
|
+
* Get a mask for all available codecs (to be used as configured_codecs).
|
|
2711
|
+
*/
|
|
2712
|
+
VIVOXSDK_DLLEXPORT unsigned int vx_get_available_codecs_mask(void);
|
|
2713
|
+
|
|
2714
|
+
/**
|
|
2715
|
+
* Get a recommended default mask for available codecs (to be used as configured_codecs).
|
|
2716
|
+
*/
|
|
2717
|
+
VIVOXSDK_DLLEXPORT unsigned int vx_get_default_codecs_mask(void);
|
|
2718
|
+
|
|
2719
|
+
/**
|
|
2720
|
+
* Get the current period of the Memory Usage information dumping to logcat.
|
|
2721
|
+
* \note Android platform only. Does nothing on other platforms.
|
|
2722
|
+
*
|
|
2723
|
+
* @return - The sampling interval in seconds. 0 if memory dump is turned off.
|
|
2724
|
+
*/
|
|
2725
|
+
VIVOXSDK_DLLEXPORT int vx_get_dump_memory_interval(void);
|
|
2726
|
+
|
|
2727
|
+
/**
|
|
2728
|
+
* Start the CPU load information dumping to logcat.
|
|
2729
|
+
* \note Android platform only. Does nothing on other platforms.
|
|
2730
|
+
*
|
|
2731
|
+
* @param interval - [in] The sampling interval in milliseconds. The recommended value is 1000 milliseconds. It is not recommended to have this value under 100 milliseconds.
|
|
2732
|
+
* @param report_interval - [in] The reporting interval in milliseconds. The SDK will dump the collected data to logcat once per reporting interval. The recommended value is 5000 milliseconds. It is not recommended to have this value under 1000 milliseconds.
|
|
2733
|
+
*
|
|
2734
|
+
* Larger report_interval reduces the average amount of information output by the SDK to logcat.
|
|
2735
|
+
* Smaller sampling intervals allow for better detection of short peak loads.
|
|
2736
|
+
*/
|
|
2737
|
+
VIVOXSDK_DLLEXPORT int vx_cpumonitor_start(int interval, int report_interval);
|
|
2738
|
+
|
|
2739
|
+
/**
|
|
2740
|
+
* Stop the CPU load information dumping to logcat.
|
|
2741
|
+
* \note Android platform only. Does nothing on other platforms.
|
|
2742
|
+
*/
|
|
2743
|
+
VIVOXSDK_DLLEXPORT int vx_cpumonitor_stop(void);
|
|
2744
|
+
|
|
2745
|
+
/**
|
|
2746
|
+
* Start the requested number of tight loop threads with the requested priority.
|
|
2747
|
+
* \note Android platform only. Does nothing on other platforms.
|
|
2748
|
+
*
|
|
2749
|
+
* Android devices can scale the CPU frequency down or stop some cores when the load is low.
|
|
2750
|
+
* This decreases the device performance and affects the CPU load measurements provided by vx_cpumonitor_start() - the reported load will be higher.
|
|
2751
|
+
* To prevent this, the vx_cpumonitor_start_eater() is provided.
|
|
2752
|
+
* If low priority threads with tight loops will be started for each available CPU core, then the system sets each core frequency to its maximum value, and the measurement results reflect the CPU load relative to the device's maximum possible performance.
|
|
2753
|
+
* \attention After working for some time at the maximum possible speed, the CPU will heat up, and the system will throttle it to prevent overheating.
|
|
2754
|
+
*
|
|
2755
|
+
* @param nthreads - [in] The number of threads with tight loops to start. Passing 0 starts the number of threads matching the number of available device processor cores.
|
|
2756
|
+
* @param priority - [in] The scheduling priority to be used for each created thread. 0 leaves the default priority. Valid non-zero values are from -20 (the maximum priority - this is dangerous and should not be used) to 20 (the minimum possible priority). It is recommended that you use value 0 for priority.
|
|
2757
|
+
*/
|
|
2758
|
+
VIVOXSDK_DLLEXPORT int vx_cpumonitor_start_eater(int nthreads, int priority);
|
|
2759
|
+
|
|
2760
|
+
/**
|
|
2761
|
+
* Stop all the CPU eater threads started with vx_cpumonitor_start_eater() call.
|
|
2762
|
+
* \note Android platform only. Does nothing on other platforms.
|
|
2763
|
+
*/
|
|
2764
|
+
VIVOXSDK_DLLEXPORT int vx_cpumonitor_stop_eater(void);
|
|
2765
|
+
|
|
2766
|
+
/**
|
|
2767
|
+
* Values for vx_crash_test( crash type ).
|
|
2768
|
+
*/
|
|
2769
|
+
typedef enum vx_crash_test_type {
|
|
2770
|
+
/**
|
|
2771
|
+
* Crash on access to the zero pointer.
|
|
2772
|
+
*/
|
|
2773
|
+
vx_crash_access_zero_pointer = 0,
|
|
2774
|
+
|
|
2775
|
+
/**
|
|
2776
|
+
* Crash on access to a restricted page.
|
|
2777
|
+
*/
|
|
2778
|
+
vx_crash_access_violation = 1,
|
|
2779
|
+
|
|
2780
|
+
/**
|
|
2781
|
+
* Overflow the program stack.
|
|
2782
|
+
*/
|
|
2783
|
+
vx_crash_stack_overflow = 2,
|
|
2784
|
+
|
|
2785
|
+
/**
|
|
2786
|
+
* Corrupt the heap and try to allocate more memory.
|
|
2787
|
+
*/
|
|
2788
|
+
vx_crash_heap_corruption = 3,
|
|
2789
|
+
|
|
2790
|
+
#ifdef __clang__
|
|
2791
|
+
/**
|
|
2792
|
+
* Corrupt the heap and try to allocate more memory.
|
|
2793
|
+
*/
|
|
2794
|
+
vx_crash_builtin_trap = 4
|
|
2795
|
+
#endif
|
|
2796
|
+
} vx_crash_test_type_t;
|
|
2797
|
+
|
|
2798
|
+
/**
|
|
2799
|
+
* Crash the program.
|
|
2800
|
+
*
|
|
2801
|
+
* @param crash_type - The type of crash (see vx_crash_test_type).
|
|
2802
|
+
*
|
|
2803
|
+
* \ingroup diagnostics
|
|
2804
|
+
*/
|
|
2805
|
+
VIVOXSDK_DLLEXPORT int vx_crash_test(vx_crash_test_type_t crash_type);
|
|
2806
|
+
|
|
2807
|
+
/**
|
|
2808
|
+
* Change the API message rate parameters.
|
|
2809
|
+
*
|
|
2810
|
+
* @param messageSpeed - Messages per second.
|
|
2811
|
+
* @param fillBucket - is bool
|
|
2812
|
+
*
|
|
2813
|
+
* \ingroup diagnostics
|
|
2814
|
+
*/
|
|
2815
|
+
VIVOXSDK_DLLEXPORT int vx_set_message_rate_params(unsigned bucketSize, float messageSpeed, int fillBucket);
|
|
2816
|
+
|
|
2817
|
+
/**
|
|
2818
|
+
* Return the API message rate parameters to their default state.
|
|
2819
|
+
*
|
|
2820
|
+
* \ingroup diagnostics
|
|
2821
|
+
*/
|
|
2822
|
+
VIVOXSDK_DLLEXPORT int vx_set_default_message_rate_params(void);
|
|
2823
|
+
|
|
2824
|
+
/**
|
|
2825
|
+
* Mute or unmute the mic on Android.
|
|
2826
|
+
* \note Android platform only. Does nothing on other platforms.
|
|
2827
|
+
*
|
|
2828
|
+
* @param mute - Non-zero mutes the microphone; 0 unmutes.
|
|
2829
|
+
* @return - Non-zero if previous state was muted, 0 if previous state was unmuted.
|
|
2830
|
+
*
|
|
2831
|
+
* \ingroup diagnostics
|
|
2832
|
+
*/
|
|
2833
|
+
VIVOXSDK_DLLEXPORT int vx_android_set_mic_mute(int mute);
|
|
2834
|
+
|
|
2835
|
+
/**
|
|
2836
|
+
* Internal: enable debug mode and disable the strict parameter check of some requests.
|
|
2837
|
+
* \attention Do not call this function if you are not completely sure of what are you doing!
|
|
2838
|
+
*
|
|
2839
|
+
* \ingroup diagnostics
|
|
2840
|
+
*/
|
|
2841
|
+
VIVOXSDK_DLLEXPORT int vx_internal_enable_debug_mode_disable_strict_checks(void);
|
|
2842
|
+
|
|
2843
|
+
/**
|
|
2844
|
+
* Internal: disable the debug mode enabled by vx_internal_enable_debug_mode_disable_strict_checks.
|
|
2845
|
+
* \attention Do not call this function if you are not completely sure of what are you doing!
|
|
2846
|
+
*
|
|
2847
|
+
* \ingroup diagnostics
|
|
2848
|
+
*/
|
|
2849
|
+
VIVOXSDK_DLLEXPORT int vx_internal_disable_debug_mode_enable_strict_checks(void);
|
|
2850
|
+
|
|
2851
|
+
/**
|
|
2852
|
+
* Verify whether the passed access token is well-formed.
|
|
2853
|
+
*
|
|
2854
|
+
* @param access_token - [in] An access token to check.
|
|
2855
|
+
* @param error - [out] An optional pointer to the returned verbose error description. Can be NULL. The returned string must be disposed of with vx_free() call.
|
|
2856
|
+
* @return - Non-zero if access token looks well-formed, 0 otherwise.
|
|
2857
|
+
*/
|
|
2858
|
+
VIVOXSDK_DLLEXPORT int vx_is_access_token_well_formed(const char *access_token, char **error);
|
|
2859
|
+
|
|
2860
|
+
/**
|
|
2861
|
+
* The Vivox eXtended Data (VXD) that is received.
|
|
2862
|
+
*
|
|
2863
|
+
* \ingroup session
|
|
2864
|
+
*/
|
|
2865
|
+
typedef struct vx_vxd {
|
|
2866
|
+
/**
|
|
2867
|
+
* Struct version.
|
|
2868
|
+
* Must be sizeof(vx_vxd_t);
|
|
2869
|
+
*/
|
|
2870
|
+
size_t version;
|
|
2871
|
+
|
|
2872
|
+
/**
|
|
2873
|
+
* The URI of the participant whose properties are being updated.
|
|
2874
|
+
*/
|
|
2875
|
+
char *participant_uri;
|
|
2876
|
+
|
|
2877
|
+
/**
|
|
2878
|
+
* The data that is received.
|
|
2879
|
+
*/
|
|
2880
|
+
char *data;
|
|
2881
|
+
|
|
2882
|
+
/**
|
|
2883
|
+
* The amount of data received.
|
|
2884
|
+
*/
|
|
2885
|
+
size_t data_size;
|
|
2886
|
+
} vx_vxd_t;
|
|
2887
|
+
|
|
2888
|
+
/**
|
|
2889
|
+
* Send VXD into the channel.
|
|
2890
|
+
*
|
|
2891
|
+
* @param session_handle - [in] The session handle to send VXD to.
|
|
2892
|
+
* @param data - [in] The data to be sent.
|
|
2893
|
+
* @param size - [in] The data size in bytes.
|
|
2894
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized, invalid argument (session, ptr), size too big).
|
|
2895
|
+
*
|
|
2896
|
+
* \ingroup session
|
|
2897
|
+
*/
|
|
2898
|
+
VIVOXSDK_DLLEXPORT int vx_vxd_send(VX_HANDLE session_handle, const char *data, size_t size);
|
|
2899
|
+
|
|
2900
|
+
/**
|
|
2901
|
+
* Receive VXD from the channel.
|
|
2902
|
+
*
|
|
2903
|
+
* @param session_handle - [in] The session handle to receive VXD from.
|
|
2904
|
+
* @param vxd_ptr - [out] On success, will contain a pointer to the received VXD. Untouched on failure. The caller is responsible for disposing of it with vx_vxd_destroy().
|
|
2905
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized, invalid argument (session, ptr), no more data).
|
|
2906
|
+
*
|
|
2907
|
+
* \ingroup session
|
|
2908
|
+
*/
|
|
2909
|
+
VIVOXSDK_DLLEXPORT int vx_vxd_recv(VX_HANDLE session_handle, vx_vxd_t **vxd_ptr);
|
|
2910
|
+
|
|
2911
|
+
/**
|
|
2912
|
+
* Dispose of the VXD object returned by vx_vxd_recv().
|
|
2913
|
+
*
|
|
2914
|
+
* @param vxd - [in] VXD to dispose
|
|
2915
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized).
|
|
2916
|
+
*
|
|
2917
|
+
* \ingroup session
|
|
2918
|
+
*/
|
|
2919
|
+
VIVOXSDK_DLLEXPORT int vx_vxd_destroy(vx_vxd_t *vxd);
|
|
2920
|
+
|
|
2921
|
+
/**
|
|
2922
|
+
* The type of path used by the SDK.
|
|
2923
|
+
*/
|
|
2924
|
+
typedef enum {
|
|
2925
|
+
/**
|
|
2926
|
+
* The path to the folder where internal SDK data is stored.
|
|
2927
|
+
* Ends with a platform-specific separator.
|
|
2928
|
+
*/
|
|
2929
|
+
path_cache_folder = 0
|
|
2930
|
+
} vx_path_id;
|
|
2931
|
+
|
|
2932
|
+
/**
|
|
2933
|
+
* Get a specific path of various files and folders used by the SDK.
|
|
2934
|
+
*
|
|
2935
|
+
* @param - The path ID.
|
|
2936
|
+
* @return - A null-terminated buffer to be freed with vx_free(). If NULL is returned, an error occurred.
|
|
2937
|
+
*/
|
|
2938
|
+
VIVOXSDK_DLLEXPORT char *vx_get_path(unsigned int path_id);
|
|
2939
|
+
|
|
2940
|
+
/**
|
|
2941
|
+
* Get the current value of the dynamic voice processing switching enabled setting.
|
|
2942
|
+
*
|
|
2943
|
+
* @param enabled - [out] A pointer to the returned value (0 if disabled, 1 if enabled).
|
|
2944
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2945
|
+
*/
|
|
2946
|
+
VIVOXSDK_DLLEXPORT int vx_get_dynamic_voice_processing_switching_enabled(int *enabled);
|
|
2947
|
+
|
|
2948
|
+
/**
|
|
2949
|
+
* Enable and disable dynamic voice processing switching.
|
|
2950
|
+
*
|
|
2951
|
+
* @param enabled - 1 to enable dynamic voice processing switching, and 0 to disable.
|
|
2952
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized).
|
|
2953
|
+
*/
|
|
2954
|
+
VIVOXSDK_DLLEXPORT int vx_set_dynamic_voice_processing_switching_enabled(int enabled);
|
|
2955
|
+
|
|
2956
|
+
/**
|
|
2957
|
+
* Get the mode for the ios_voice_processing_io_mode configuration field
|
|
2958
|
+
*
|
|
2959
|
+
* @param enabled - [out] A pointer to the returned value (2 to always use VPIO, 1 to use VPIO only for speakerphone, 0 to never use the VPIO).
|
|
2960
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2961
|
+
*/
|
|
2962
|
+
VIVOXSDK_DLLEXPORT int vx_get_ios_voice_processing_io_mode(int *mode);
|
|
2963
|
+
|
|
2964
|
+
/**
|
|
2965
|
+
* Set the mode for the ios_voice_processing_io_mode configuration field
|
|
2966
|
+
*
|
|
2967
|
+
* @param enabled - 2 to always use VPIO, 1 to use VPIO only for speakerphone, 0 to never use the VPIO
|
|
2968
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2969
|
+
*/
|
|
2970
|
+
VIVOXSDK_DLLEXPORT int vx_set_ios_voice_processing_io_mode(int mode);
|
|
2971
|
+
|
|
2972
|
+
/**
|
|
2973
|
+
* Return an indication of whether platform-provided AEC is being used.
|
|
2974
|
+
*
|
|
2975
|
+
* @param enabled - [out] A pointer to the returned value (0 if disabled, 1 if enabled).
|
|
2976
|
+
* @return - 0 if successful, non-zero if failed.
|
|
2977
|
+
*/
|
|
2978
|
+
VIVOXSDK_DLLEXPORT int vx_get_platform_aec_enabled(int *enabled);
|
|
2979
|
+
|
|
2980
|
+
/**
|
|
2981
|
+
* Enable and disable platform-provided AEC.
|
|
2982
|
+
* \note iOS only: This is an alias of vx_set_ios_voice_processing_io_mode(0|1). `0` when disabling, `1` when enabling.
|
|
2983
|
+
*
|
|
2984
|
+
* @param enabled - 1 to enable platform-provided AEC, or 0 to disable.
|
|
2985
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized).
|
|
2986
|
+
*/
|
|
2987
|
+
VIVOXSDK_DLLEXPORT int vx_set_platform_aec_enabled(int enabled);
|
|
2988
|
+
|
|
2989
|
+
/**
|
|
2990
|
+
* Get the internal AEC enabled/disabled state.
|
|
2991
|
+
* Enabling does not force AEC usage, but allows the SDK to use AEC when it is required.
|
|
2992
|
+
*
|
|
2993
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized, internal AEC is not supported).
|
|
2994
|
+
*/
|
|
2995
|
+
VIVOXSDK_DLLEXPORT int vx_get_vivox_aec_enabled(int *enabled);
|
|
2996
|
+
|
|
2997
|
+
/**
|
|
2998
|
+
* Enable or disable the SDK's internal AEC.
|
|
2999
|
+
* Enabling does not force AEC usage, but allows the SDK to use AEC when it is required.
|
|
3000
|
+
*
|
|
3001
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized, internal AEC is not supported).
|
|
3002
|
+
*/
|
|
3003
|
+
VIVOXSDK_DLLEXPORT int vx_set_vivox_aec_enabled(int enabled);
|
|
3004
|
+
|
|
3005
|
+
typedef enum {
|
|
3006
|
+
noise_suppression_low = 0,
|
|
3007
|
+
noise_suppression_moderate = 1,
|
|
3008
|
+
noise_suppression_high = 2,
|
|
3009
|
+
noise_suppression_very_high = 3
|
|
3010
|
+
} vx_noise_suppression_level;
|
|
3011
|
+
|
|
3012
|
+
/**
|
|
3013
|
+
* Get the capture audio noise suppressor enabled/disabled state.
|
|
3014
|
+
*
|
|
3015
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized, invalid arguments).
|
|
3016
|
+
*/
|
|
3017
|
+
VIVOXSDK_DLLEXPORT int vx_get_noise_suppression_enabled(int *enabled);
|
|
3018
|
+
|
|
3019
|
+
/**
|
|
3020
|
+
* Get the capture audio noise suppressor suppression level.
|
|
3021
|
+
* If noise suppression is disabled, 'level' reports the noise suppression level that will be used if noise suppression becomes enabled.
|
|
3022
|
+
*
|
|
3023
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized, invalid arguments).
|
|
3024
|
+
*/
|
|
3025
|
+
VIVOXSDK_DLLEXPORT int vx_get_noise_suppression_level(vx_noise_suppression_level *level);
|
|
3026
|
+
|
|
3027
|
+
/**
|
|
3028
|
+
* Enable or disable the SDK's capture audio noise suppressor.
|
|
3029
|
+
*
|
|
3030
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized).
|
|
3031
|
+
*/
|
|
3032
|
+
VIVOXSDK_DLLEXPORT int vx_set_noise_suppression_enabled(int enabled);
|
|
3033
|
+
|
|
3034
|
+
/**
|
|
3035
|
+
* Set the capture audio noise suppressor's suppression level.
|
|
3036
|
+
* A low suppression level slightly reduces steady-state noise while barely affecting voice.
|
|
3037
|
+
* A high suppression level greatly reduces steady-state noise but may distort voice.
|
|
3038
|
+
*
|
|
3039
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized).
|
|
3040
|
+
*/
|
|
3041
|
+
VIVOXSDK_DLLEXPORT int vx_set_noise_suppression_level(vx_noise_suppression_level level);
|
|
3042
|
+
|
|
3043
|
+
/**
|
|
3044
|
+
* Enable or disable the SDK's internal AGC.
|
|
3045
|
+
* Enabling does not force AGC usage, but allows the SDK to use AGC when it is required.
|
|
3046
|
+
*
|
|
3047
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized, internal AGC is not supported).
|
|
3048
|
+
*/
|
|
3049
|
+
VIVOXSDK_DLLEXPORT int vx_set_agc_enabled(int enabled);
|
|
3050
|
+
|
|
3051
|
+
/**
|
|
3052
|
+
* Get the internal AGC enabled/disabled state.
|
|
3053
|
+
* Enabling does not force AGC usage, but allows the SDK to use AGC when it is required.
|
|
3054
|
+
*
|
|
3055
|
+
* @return - 0 if successful, non-zero if failed (SDK not initialized, internal AGC is not supported).
|
|
3056
|
+
*/
|
|
3057
|
+
VIVOXSDK_DLLEXPORT int vx_get_agc_enabled(int *enabled);
|
|
3058
|
+
|
|
3059
|
+
/**
|
|
3060
|
+
* Enable or disable volume based audio duplication suppression.
|
|
3061
|
+
* By default, when a remote participant is transmitting to multiple channels, the SDK will only render the audio once where the participant is loudest.
|
|
3062
|
+
* Note that this does not apply to 3D channels, where the SDK always renders the audio of all participants.
|
|
3063
|
+
* Disabling this allows the SDK to duplicate audio for local rendering of 2D channels when a remote participant is transmitting to multiple channels.
|
|
3064
|
+
*
|
|
3065
|
+
* @return - 0 if successful, non-zero if failed.
|
|
3066
|
+
*/
|
|
3067
|
+
VIVOXSDK_DLLEXPORT int vx_set_volume_based_duplication_suppression_enabled(int enabled);
|
|
3068
|
+
|
|
3069
|
+
/**
|
|
3070
|
+
* Get the internal state of the volume based audio duplication suppression.
|
|
3071
|
+
* By default, when a remote participant is transmitting to multiple channels, the SDK will only render the audio once where the participant is loudest.
|
|
3072
|
+
* Note that this does not apply to 3D channels, where the SDK always renders the audio of all participants.
|
|
3073
|
+
* Disabling this allows the SDK to duplicate audio for local rendering of 2D channels when a remote participant is transmitting to multiple channels.
|
|
3074
|
+
*
|
|
3075
|
+
* @return - 0 if successful, non-zero if failed.
|
|
3076
|
+
*/
|
|
3077
|
+
VIVOXSDK_DLLEXPORT int vx_get_volume_based_duplication_suppression_enabled(int *enabled);
|
|
3078
|
+
|
|
3079
|
+
/**
|
|
3080
|
+
* Enable or disable the SDK's internal volume protection for 3D channels.
|
|
3081
|
+
* Enabling volume protection lowers 3D channel max loudness so that distortion cannot occur at the default volume while sound is off-center.
|
|
3082
|
+
* Disabling volume protection will increase 3D channel max loudness, but slight distortion may occur at the default volume while sound is off-center.
|
|
3083
|
+
*
|
|
3084
|
+
* @return - 0 if successful, non-zero if failed
|
|
3085
|
+
*/
|
|
3086
|
+
VIVOXSDK_DLLEXPORT int vx_set_3d_channel_volume_protection_enabled(int enabled);
|
|
3087
|
+
|
|
3088
|
+
/**
|
|
3089
|
+
* Get the internal 3D channel volume protection state.
|
|
3090
|
+
*
|
|
3091
|
+
* @return - 0 if successful, non-zero if failed
|
|
3092
|
+
*/
|
|
3093
|
+
VIVOXSDK_DLLEXPORT int vx_get_3d_channel_volume_protection_enabled(int *enabled);
|
|
3094
|
+
|
|
3095
|
+
/**
|
|
3096
|
+
* Enable or disable the SDK's internal audio clipping protector (soft clipper).
|
|
3097
|
+
* The audio clipping protector can only affect boosted audio (capture or render with volume settings greater than 50)
|
|
3098
|
+
* Enabling this allows Vivox to reduce the dynamic range of samples that are near clipping. Disabling allows ordinary clipping to occur.
|
|
3099
|
+
*
|
|
3100
|
+
* @param enabled - 1 to enable the audio clipping protector, 0 to disable.
|
|
3101
|
+
* @return - 0 if successful, non-zero if failed.
|
|
3102
|
+
*/
|
|
3103
|
+
VIVOXSDK_DLLEXPORT int vx_set_audio_clipping_protector_enabled(int enabled);
|
|
3104
|
+
|
|
3105
|
+
/**
|
|
3106
|
+
* Get the internal audio clipping protector enabled state.
|
|
3107
|
+
* Enabling allows Vivox to reduce the dynamic range of samples that are near clipping. Disabling allows ordinary clipping to occur.
|
|
3108
|
+
*
|
|
3109
|
+
* @param enabled - [out] A pointer to the returned value (0 if disabled, 1 if enabled).
|
|
3110
|
+
* @return - 0 if successful, non-zero if failed.
|
|
3111
|
+
*/
|
|
3112
|
+
VIVOXSDK_DLLEXPORT int vx_get_audio_clipping_protector_enabled(int *enabled);
|
|
3113
|
+
|
|
3114
|
+
/**
|
|
3115
|
+
* Change the behavior of the SDK's internal audio clipping protector (soft clipper).
|
|
3116
|
+
* The audio clipping protector can only affect boosted audio (capture or render with volume settings greater than 50)
|
|
3117
|
+
*
|
|
3118
|
+
* Clipping protection is applied only above a threshold in dBFS. threshold_db = max(boost * threshold_boost_slope, minimum_threshold_db)
|
|
3119
|
+
* ex. +10 dB boost (volume 60), threshold_boost_slope = -0.1, minimum_threshold_db = -6.0: threshold_db = max(10 * -0.1, -6.0) = -1.0.
|
|
3120
|
+
* ex. (cont) Clipping protection would only be applied to amplitudes exceeding -1.0 dBFS.
|
|
3121
|
+
*
|
|
3122
|
+
* @param minimum_threshold_db - The lowest point in dBFS where clipping protection can be applied. -50.0 <= value < 0.0.
|
|
3123
|
+
* @param threshold_boost_slope - The ratio between boost gain and the calculated threshold_db. -1.0 <= value <= -0.1.
|
|
3124
|
+
* @return - 0 if successful, non-zero if failed.
|
|
3125
|
+
*/
|
|
3126
|
+
VIVOXSDK_DLLEXPORT int vx_set_audio_clipping_protector_parameters(float minimum_threshold_db, float threshold_boost_slope);
|
|
3127
|
+
|
|
3128
|
+
/**
|
|
3129
|
+
* Get the internal audio clipping protector's parameters.
|
|
3130
|
+
*
|
|
3131
|
+
* @param minimum_threshold_db - [out] The lowest point in dBFS where clipping protection can be applied. -50.0 <= value < 0.0.
|
|
3132
|
+
* @param threshold_boost_slope - [out] The ratio between boost gain and the calculated threshold_db. -1.0 <= value <= -0.1.
|
|
3133
|
+
* @return - 0 if successful, non-zero if failed.
|
|
3134
|
+
*/
|
|
3135
|
+
VIVOXSDK_DLLEXPORT int vx_get_audio_clipping_protector_parameters(float *minimum_threshold_db, float *threshold_boost_slope);
|
|
3136
|
+
|
|
3137
|
+
/**
|
|
3138
|
+
* Text-to-speech (TTS) definitions.
|
|
3139
|
+
*/
|
|
3140
|
+
|
|
3141
|
+
/**
|
|
3142
|
+
* Destination definitions used by the text-to-speech subsystem.
|
|
3143
|
+
*/
|
|
3144
|
+
typedef enum {
|
|
3145
|
+
tts_dest_remote_transmission = 0, /**< Immediately send to participants in connected sessions. Mixes new messages with any other ongoing messages.*/
|
|
3146
|
+
tts_dest_local_playback = 1, /**< Immediately play back locally on a render device (for example, speakers). Mixes new messages with any other ongoing messages. */
|
|
3147
|
+
tts_dest_remote_transmission_with_local_playback = 2, /**< Immediately play back locally on a render device and send to participants in connected sessions. Mixes new messages with any other ongoing messages. */
|
|
3148
|
+
tts_dest_queued_remote_transmission = 3, /**< Send to participants in connected sessions, or enqueue if there is already an ongoing message playing in this destination. */
|
|
3149
|
+
tts_dest_queued_local_playback = 4, /**< Play back locally on a render device (for example, speakers), or enqueue if there is already an ongoing message playing in this destination. */
|
|
3150
|
+
tts_dest_queued_remote_transmission_with_local_playback = 5, /**< Play back locally on a render device and send to participants in connected sessions. Enqueue if there is already an ongoing message playing in this destination. */
|
|
3151
|
+
tts_dest_screen_reader = 6 /**< Immediately play back locally on a render device (for example, speakers). Replaces the currently playing message in this destination. */
|
|
3152
|
+
} vx_tts_destination;
|
|
3153
|
+
|
|
3154
|
+
/**
|
|
3155
|
+
* Status codes that are returned by the text-to-speech subsystem.
|
|
3156
|
+
*/
|
|
3157
|
+
typedef enum {
|
|
3158
|
+
tts_status_success = 0, /**< Successful TTS operation. */
|
|
3159
|
+
tts_error_invalid_engine_type = -1001, /**< Invalid TTS engine type. */
|
|
3160
|
+
tts_error_engine_allocation_failed = -1002, /**< TTS engine allocation failed. */
|
|
3161
|
+
tts_error_not_supported = -1003, /**< TTS operation is not supported or is not yet implemented. */
|
|
3162
|
+
tts_error_max_characters_exceeded = -1004, /**< Message exceeded the maximum number of input text characters. The maximum number of characters is 200. */
|
|
3163
|
+
tts_error_utterance_below_min_duration = -1005, /**< The text-to-speech utterance was below 20ms after synthesis and was ignored. */
|
|
3164
|
+
tts_status_input_text_was_enqueued = -1006, /**< TTS message was enqueued because there is another TTS message already playing. */
|
|
3165
|
+
tts_error_sdk_not_initialized = -1007, /**< SDK is not initialized. Initialize the SDK and retry. */
|
|
3166
|
+
tts_error_destination_queue_is_full = -1008, /**< Destination queue is full. Destination queue limit is 10 items. */
|
|
3167
|
+
tts_status_enqueue_not_necessary = -1009, /**< Queue is empty and no active TTS message is playing. Ready for injection. */
|
|
3168
|
+
tts_error_utterance_not_found = -1010, /**< Utterance was not found. */
|
|
3169
|
+
tts_error_manager_not_found = -1011, /**< Text-to-speech manager was not found. */
|
|
3170
|
+
tts_error_invalid_argument = -1012, /**< One or more arguments are invalid. */
|
|
3171
|
+
tts_error_internal = -1013 /**< Internal error. */
|
|
3172
|
+
} vx_tts_status;
|
|
3173
|
+
|
|
3174
|
+
typedef unsigned int vx_tts_manager_id;
|
|
3175
|
+
typedef unsigned int vx_tts_utterance_id;
|
|
3176
|
+
typedef unsigned int vx_tts_voice_id;
|
|
3177
|
+
|
|
3178
|
+
/* End definitions outside of #ifndef VX_DISABLE_TTS */
|
|
3179
|
+
|
|
3180
|
+
#ifndef VX_DISABLE_TTS
|
|
3181
|
+
#define VX_TTS_CHARACTER_COUNT_LIMIT 200
|
|
3182
|
+
#define VX_TTS_MAX_DESTINATION_QUEUE_SIZE 10
|
|
3183
|
+
#define VX_TTS_DEFAULT_DESTINATION tts_dest_remote_transmission
|
|
3184
|
+
|
|
3185
|
+
/**
|
|
3186
|
+
* Text-to-speech engine types.
|
|
3187
|
+
*/
|
|
3188
|
+
typedef enum {
|
|
3189
|
+
/**
|
|
3190
|
+
* Vivox Default TTS Engine.
|
|
3191
|
+
*/
|
|
3192
|
+
tts_engine_vivox_default = 0
|
|
3193
|
+
} vx_tts_engine_type;
|
|
3194
|
+
|
|
3195
|
+
typedef struct vx_tts_utterance_impl vx_tts_utterance_impl_t;
|
|
3196
|
+
|
|
3197
|
+
/**
|
|
3198
|
+
* Text-to-speech utterance.
|
|
3199
|
+
*/
|
|
3200
|
+
typedef struct vx_tts_utterance {
|
|
3201
|
+
const vx_tts_utterance_impl_t * const utterance_obj; /**< The backing implementation of the utterance. */
|
|
3202
|
+
const short *speech_buffer; /**< The PCM buffer of synthesized speech. */
|
|
3203
|
+
int sample_rate; /**< The sample rate of audio in the utterance. */
|
|
3204
|
+
int num_frames; /**< The number of frames of audio in the utterance. */
|
|
3205
|
+
int num_channels; /**< The number of channels that the audio in the utterance consists of. */
|
|
3206
|
+
} vx_tts_utterance_t;
|
|
3207
|
+
|
|
3208
|
+
/**
|
|
3209
|
+
* Text-to-speech voice.
|
|
3210
|
+
*/
|
|
3211
|
+
typedef struct vx_tts_voice {
|
|
3212
|
+
vx_tts_voice_id voice_id; /**< The unique identifier of the voice. */
|
|
3213
|
+
const char *name; /**< The name of the voice. */
|
|
3214
|
+
} vx_tts_voice_t;
|
|
3215
|
+
|
|
3216
|
+
/**
|
|
3217
|
+
* Initialize a new text-to-speech manager.
|
|
3218
|
+
*
|
|
3219
|
+
* @param engine_type - The type of the text-to-speech engine. If unsure what to use, it is recommended that you use the default.
|
|
3220
|
+
* @param tts_manager_id - [out] A unique identifier of the newly created text-to-speech manager.
|
|
3221
|
+
* @return - The status code description.
|
|
3222
|
+
*/
|
|
3223
|
+
VIVOXSDK_DLLEXPORT vx_tts_status vx_tts_initialize(vx_tts_engine_type engine_type, vx_tts_manager_id *tts_manager_id);
|
|
3224
|
+
|
|
3225
|
+
/**
|
|
3226
|
+
* Get the available voices for a text-to-speech manager.
|
|
3227
|
+
*
|
|
3228
|
+
* @param tts_manager_id - A unique identifier of the TTS manager
|
|
3229
|
+
* @param num_voices - [out] The number of voices supported by the text-to-speech manager.
|
|
3230
|
+
* @param voices - [out] A pointer to the first voice. This does not need to be deleted when you are finished using it.
|
|
3231
|
+
* @return - The status code description.
|
|
3232
|
+
*/
|
|
3233
|
+
VIVOXSDK_DLLEXPORT vx_tts_status vx_tts_get_voices(vx_tts_manager_id tts_manager_id, int *num_voices, vx_tts_voice_t **voices);
|
|
3234
|
+
|
|
3235
|
+
/**
|
|
3236
|
+
* Uninitialize and shut down a text-to-speech manager.
|
|
3237
|
+
*
|
|
3238
|
+
* @param tts_manager_id - A unique identifier of the TTS manager to shutdown. Passing NULL shuts down all managers.
|
|
3239
|
+
* @see vx_tts_initialize()
|
|
3240
|
+
* @return - The status code description.
|
|
3241
|
+
*/
|
|
3242
|
+
VIVOXSDK_DLLEXPORT vx_tts_status vx_tts_shutdown(vx_tts_manager_id *tts_manager_id);
|
|
3243
|
+
|
|
3244
|
+
/**
|
|
3245
|
+
* Return a textual representation of a text-to-speech status code.
|
|
3246
|
+
*
|
|
3247
|
+
* @param status_code - The text-to-speech status code.
|
|
3248
|
+
* @return - The status code description.
|
|
3249
|
+
*/
|
|
3250
|
+
VIVOXSDK_DLLEXPORT const char *vx_get_tts_status_string(vx_tts_status status_code);
|
|
3251
|
+
|
|
3252
|
+
/**
|
|
3253
|
+
* Convert the input text into speech and process the generated utterance on the selected destination.
|
|
3254
|
+
*
|
|
3255
|
+
* @param tts_manager_id - A unique identifier of the TTS manager.
|
|
3256
|
+
* @param voice_id - A unique identifier of the voice.
|
|
3257
|
+
* @param input_text - The text message to be converted into speech.
|
|
3258
|
+
* @param tts_dest - The destination on which to play the message.
|
|
3259
|
+
* @param utterance_id - [out] A unique identifier of the utterance.
|
|
3260
|
+
* @return - The status code description.
|
|
3261
|
+
*/
|
|
3262
|
+
VIVOXSDK_DLLEXPORT vx_tts_status vx_tts_speak(vx_tts_manager_id tts_manager_id, vx_tts_voice_id voice_id, const char *input_text, vx_tts_destination tts_dest, vx_tts_utterance_id *utterance_id);
|
|
3263
|
+
|
|
3264
|
+
/**
|
|
3265
|
+
* Convert the input text into speech and return the generated utterance.
|
|
3266
|
+
*
|
|
3267
|
+
* @param tts_manager_id - A unique identifier of the TTS manager.
|
|
3268
|
+
* @param voice_id - A unique identifier of the voice.
|
|
3269
|
+
* @param input_text - The text message to be converted into speech.
|
|
3270
|
+
* @param utterance - [out] The utterance generated from the input text.
|
|
3271
|
+
* @return - The status code description.
|
|
3272
|
+
*/
|
|
3273
|
+
VIVOXSDK_DLLEXPORT vx_tts_status vx_tts_speak_to_buffer(vx_tts_manager_id tts_manager_id, vx_tts_voice_id voice_id, const char *input_text, vx_tts_utterance_t **utterance);
|
|
3274
|
+
|
|
3275
|
+
/**
|
|
3276
|
+
* Destroy an utterance.
|
|
3277
|
+
* Call this function to free up all of the memory that is taken by an utterance.
|
|
3278
|
+
*
|
|
3279
|
+
* @param tts_manager_id - A unique identifier of the TTS engine.
|
|
3280
|
+
* @param utterance - The utterance to be destroyed.
|
|
3281
|
+
* @see vx_tts_speak_to_buffer()
|
|
3282
|
+
* @return - The status code description.
|
|
3283
|
+
*/
|
|
3284
|
+
VIVOXSDK_DLLEXPORT vx_tts_status vx_tts_destroy_utterance(vx_tts_manager_id tts_manager_id, vx_tts_utterance_t *utterance);
|
|
3285
|
+
|
|
3286
|
+
/**
|
|
3287
|
+
* Cancel playback of an ongoing or an enqueued text-to-speech message by its unique identifier.
|
|
3288
|
+
*
|
|
3289
|
+
* @param tts_manager_id - A unique identifier of the TTS manager.
|
|
3290
|
+
* @param utterance_id - A unique identifier of the utterance.
|
|
3291
|
+
* @see vx_tts_speak()
|
|
3292
|
+
* @return - The status code description.
|
|
3293
|
+
*/
|
|
3294
|
+
VIVOXSDK_DLLEXPORT vx_tts_status vx_tts_cancel_utterance(vx_tts_manager_id tts_manager_id, vx_tts_utterance_id utterance_id);
|
|
3295
|
+
|
|
3296
|
+
/**
|
|
3297
|
+
* Cancel playback of ongoing and all enqueued text-to-speech messages in a destination.
|
|
3298
|
+
*
|
|
3299
|
+
* @param tts_manager_id - A unique identifier of the TTS manager.
|
|
3300
|
+
* @param tts_dest - The destination to be cancelled.
|
|
3301
|
+
* @return - The status code description.
|
|
3302
|
+
*/
|
|
3303
|
+
VIVOXSDK_DLLEXPORT vx_tts_status vx_tts_cancel_all_in_dest(vx_tts_manager_id tts_manager_id, vx_tts_destination tts_dest);
|
|
3304
|
+
|
|
3305
|
+
/**
|
|
3306
|
+
* Cancel playback for all ongoing and enqueued text-to-speech messages on all destinations.
|
|
3307
|
+
*
|
|
3308
|
+
* @param tts_manager_id - A unique identifier of the TTS manager.
|
|
3309
|
+
* @return - The status code description.
|
|
3310
|
+
*/
|
|
3311
|
+
VIVOXSDK_DLLEXPORT vx_tts_status vx_tts_cancel_all(vx_tts_manager_id tts_manager_id);
|
|
3312
|
+
|
|
3313
|
+
#endif
|
|
3314
|
+
|
|
3315
|
+
#ifdef __cplusplus
|
|
3316
|
+
}
|
|
3317
|
+
#endif
|
|
3318
|
+
|
|
3319
|
+
#pragma pack(pop)
|