Skip to main content

VivoxVoice

A class in Root.Township, Alta.Voice.

Client: positional Vivox voice for one channel session. Connects the audio and sends the head's position to Vivox while active. Made by VivoxSession.

Constructors​

MemberWhat it is
VivoxVoice(IChannelSession session)Creates a VivoxVoice from session.

Fields​

6 private and internal fields
MemberWhat it is
private bool isActivatedTrue once audio is connected and until Deactivate.
private static readonly Logger loggerNLog logger for this class.
private float nextTimeReal time when the next position update may be sent.
private readonly IChannelSession sessionThe Vivox channel session.
private Transform transformHead transform whose position is sent.
private const float UpdateIntervalSeconds between position updates (0.3).

Methods​

MemberWhat it is
void Activate(Transform head)Starts positional voice from the given head transform and connects the session's audio.
void Deactivate()Stops position updates and disconnects the session unless it's already disconnected.
4 private and internal methods
MemberWhat it is
private void ConnectAudioCallback(IAsyncResult result)Finishes the async audio connect and marks voice active, or logs an error.
private static void DisconnectAudioCallback(IAsyncResult result)Logs whether the disconnect finished.
private bool IsSessionDisconnected(IChannelSession channelSession)True if the session's audio or text is disconnected or disconnecting.
private void Alta.Voice.IVivoxVoiceUpdatable.Update3DPosition()Sends the head's position and facing to Vivox, at most every 0.3 seconds. Called by VivoxClient.

Used in​

Members of other types that take, return or hold a VivoxVoice: