文档

支持

Vivox Core SDK

Vivox Core SDK

Initialize the Vivox SDK

How to initialize the Vivox voice client object.
阅读时间1 分钟最后更新于 12 天前

Before the game can issue requests to the Vivox SDK, it must first initialize the Vivox SDK by calling
vx_initialize3()
. This operation might cause additional shared libraries to be loaded, which can take anywhere from a few milliseconds to hundreds of milliseconds, depending on the machine.
The following code displays an example of how to initialize the Vivox SDK:
#include"Vxc.h"#include"VxcErrors.h". . .vx_sdk_config_t defaultConfig;int status = vx_get_default_config3(&defaultConfig, sizeof (defaultConfig));if (status != VxErrorSuccess){ printf("vx_sdk_get_default_config3() returned %d: %s\n", status, vx_get_error_string(status)); return;}status = vx_initialize3(&defaultConfig, sizeof (defaultConfig));if (status != VxErrorSuccess){ printf ("vx_initialize3() returned %d : %s\n", status, vx_get_error_string(status)); return;}// Vivox Client SDK is now initialized