Skip to main content

VivoxUtility

A static class in Root.Township, Alta.Voice.

Static helpers for Vivox voice chat: the account configuration, user and channel naming, and a wrapper that turns Vivox begin and end calls into tasks.

Fields​

MemberWhat it is
static readonly Channel3DProperties PositionalVoiceSettings3D channel settings: audible up to 50, conversational distance 1, linear fade by distance.
2 private and internal fields
MemberWhat it is
private static VivoxConfiguration configBacking field for Config.
private static Logger loggerClass logger.

Properties​

MemberWhat it is
static VivoxConfiguration Config { get; }The Vivox configuration. Uses the alta-att-dev sandbox when started with /vivox_sandbox, otherwise the live alta-att account.

Methods​

MemberWhat it is
static string GetServerName(int serverId)The Vivox channel name for a server: its id as a string.
static string GetUsername(int userId)The Vivox account name for a user: their id as a string.
static async Task<bool> MakeAsync(Func<AsyncCallback, IAsyncResult> begin, Action<IAsyncResult> end)Extension that runs a Vivox begin and end pair and returns a task that is true when the end call succeeded.
static async Task<bool> MakeAsync<T1>(Func<T1, AsyncCallback, IAsyncResult> begin, T1 arg1, Action<IAsyncResult> end)Extension that runs a Vivox begin and end pair and returns a task that is true when the end call succeeded.
static async Task<bool> MakeAsync<T1, T2>(Func<T1, T2, AsyncCallback, IAsyncResult> begin, T1 arg1, T2 arg2, Action<IAsyncResult> end)Extension that runs a Vivox begin and end pair and returns a task that is true when the end call succeeded.
1 private and internal method
MemberWhat it is
private static void End(Action<IAsyncResult> end, IAsyncResult result, TaskCompletionSource<bool> taskSource)Runs the end call and completes the task with true, or false if it threw.