#include <tox_server.h>
Data Fields | |
| const char * | player_name_unique |
| const char * | session_name_unique |
| unsigned long | circular_buffer_max_num_packets |
| unsigned long | max_packet_size |
| int | obscure_names |
| int | enable_proximity_chat |
| int | is_nonrealtime |
Configuration object when building the tox_instance
Can be discarded after calling tox_server_create_instance()
| const char* tox_server_config_t::player_name_unique |
A unique (per account_uuid) identifier for a player, needed for understanding player chat context and player behavior history
| const char* tox_server_config_t::session_name_unique |
A unique (per account_uuid) identifier for a voice chat session, needed needed for understanding session context between players chatting with each other
| unsigned long tox_server_config_t::circular_buffer_max_num_packets |
The max number of packets the circular buffer will preallocate space for. If additional packets are added before tox_server_run_buffer_copy() drains the circular buffer, those packets will be dropped
| unsigned long tox_server_config_t::max_packet_size |
The maximum number of bytes for an individual packet, larger packets will be dropped
| int tox_server_config_t::obscure_names |
bytes A flag that specifies whether the player_name_unique and session_name_unique values passed above are transmitted to the ToxMod cloud service. If they are transmitted, they will be passed alongside the ToxMod-internal player and session UUIDs inside moderation action messages and will be displayed on the ToxMod Web Console. If they are not transmitted, only ToxMod-internal player and session UUIDs will be used in the ToxMod cloud service and on the ToxMod Web Console, and the user is responsible for mapping those internal UUIDs back to known player and session identifiers (see the tox_server_get_internal_player_uuid() addindex tox_server_get_internal_session_uuid() functions).
Valid values:
0: The player and session names will be sent to the ToxMod Web Console
1: The player and session names will not be sent to the ToxMod Web Console
| int tox_server_config_t::enable_proximity_chat |
enable_proximity_chat - A flag that specifies whether the voice chat session uses proximity chat. If set to zero, proximity chat is disabled and ToxMod assumes that every player can hear every other player regardless of proximity to each other. If set to one, proximity chat is enabled and ToxMod assumes that players cannot hear each other unless specified by a proximity chat function call (see tox_server_set_proximity_chat_player_can_hear() and tox_server_set_proximity_chat_can_hear_player())
Valid values:
0: Proximity chat is disabled, all players are assumed to hear each other
1: Proximity chat is enabled, all players are assumed to not hear each other unless specified by a proximity chat function
| int tox_server_config_t::is_nonrealtime |
is_nonrealtime - A flag that specifies whether this instance will be used in a realtime or a non-realtime use case. If set to zero, ToxMod assumes that the audio being passed is in realtime. If set to any other value, ToxMod assumes that the audio being passed is not in realtime.
Valid values:
0: realtime. Gaps in passing audio are assumed to be pauses in speech and timestamps are derived from system clock
1: non-realtime. Audio is assumed to be continuous (no gaps) and timestamps are derived from length of audio not system clock