ToxMod Client SDK 1.9.0
ToxMod by Modulate
 
Loading...
Searching...
No Matches
tox_config_t Struct Reference

#include <tox.h>

Data Fields

const char * account_uuid
 
const char * api_key
 
const char * player_name_unique
 
int verbose
 
int disable_upload_after_delay
 
TOX_TRIAGE_SETTING triage_setting
 
int obscure_names
 
const char * single_tenant_prefix
 
int enable_proximity_chat
 
int enable_token_authentication
 
const char * initial_token
 

Detailed Description

Configuration object when building the tox_instance - can discard after tox_create_instance

Examples
main.c.

Field Documentation

◆ account_uuid

const char* tox_config_t::account_uuid

account_uuid - Modulate provided, visit toxmod.com or contact suppo.nosp@m.rt@m.nosp@m.odula.nosp@m.te.a.nosp@m.i

◆ api_key

const char* tox_config_t::api_key

api_key - Modulate provided, visit toxmod.com or contact suppo.nosp@m.rt@m.nosp@m.odula.nosp@m.te.a.nosp@m.i

◆ player_name_unique

const char* tox_config_t::player_name_unique

player_name_unique - A unique (per account_uuid) identifier for a player, needed for understanding player chat context and player behavior history

◆ verbose

int tox_config_t::verbose

verbose - flag for more printing of modulate debug messages Valid Values: 0: No printing 1: Print server communications/responses

◆ disable_upload_after_delay

int tox_config_t::disable_upload_after_delay

disable_upload_after_delay - disable default behavior of uploading audio after a few seconds of no speech being processed by tox_add_audio(), which ensures uploading regularly even when push-to-talk prevents realtime audio callbacks from executing. Valid Values: 0: SDK will upload speech after no audio is processed for a few seconds 1: SDK will only upload speech after a clip buffer is fully filled - suggested only to enable not processing speech in realtime and timing between multiple speakers in different threads is not important, such as sending a pre-recorded monologue through tox_add_audio_nonrealtime().

◆ triage_setting

TOX_TRIAGE_SETTING tox_config_t::triage_setting

triage_setting - what level of on-device triaging to compute on incoming audio, trading off amount of audio uploaded to Modulate's servers against on-device resource usage. See TOX_TRIAGE_SETTING for details on valid settings.

◆ obscure_names

int tox_config_t::obscure_names

obscure names - if non-zero will not send player or session name to show in the toxmod console, only internal UUIDs. Valid values: 0: SDK will send player and session names to the web console 1: SDK will never pass player and session names to the web console, only UUID hashes of them

◆ single_tenant_prefix

const char* tox_config_t::single_tenant_prefix

single_tenant_prefix - if using a single-tenant deployment, use this variable to set it at initialization so that all ToxMod functions reach the correct HTTP endpoints.

Examples
main.c.

◆ enable_proximity_chat

int tox_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_set_proximity_chat_player_can_hear() and tox_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

◆ enable_token_authentication

int tox_config_t::enable_token_authentication

enable_token_authentication - Use tokens instead of an API key to authenticate with ToxMod
To use token authentication, you will also need to:

  1. Spin up a server which can generate tokens matching ToxMod's JWT Authentication Specification.
  2. Implement logic for the game client to request tokens from your server.
  3. Pass tokens into the ToxMod SDK using the tox_set_instance_token() function.
  4. Periodically request new tokens from your server and pass them into tox_set_instance_token() before the previous token expire. tokens matching the required specification and implement logic for the game client to request a token from this server and pass it into the toxmod SDK using the tox_set_instance_token() function

◆ initial_token

const char* tox_config_t::initial_token

initial_token - If using token authentication, pass an initial token here which will be valid when tox_create_instance() is called. Some time before that token expires, call tox_set_instance_token() to update the token with a new one.


The documentation for this struct was generated from the following file: