FVivoxVoiceChat

Windows
MacOS
Linux

Inheritance Hierarchy

FSelfRegisteringExec

IVoiceChat

DebugClientApiEventHandler

FVivoxVoiceChat

References

Module

VivoxVoiceChat

Header

/Engine/Plugins/Online/VoiceChat/VivoxVoiceChat/Source/Public/VivoxVoiceChat.h

Include

#include "VivoxVoiceChat.h"

Syntax

class FVivoxVoiceChat :
    public FSelfRegisteringExec,
    public IVoiceChat,
    protected DebugClientApiEventHandler

Variables

Name Description

Protected variable

FCriticalSectio...

 

AfterCaptureAudioReadLock

Protected variable

EVoiceChatAtten...

 

AttenuationModel

Protected variable

FCriticalSectio...

 

AudioRecordLock

Recording Delegates and Critical sections.

Protected variable

FCriticalSectio...

 

BeforeCaptureAudioSentLock

Protected variable

FCriticalSectio...

 

BeforeRecvAudioRenderedLock

Protected variable

bool

 

bInitialized

Protected variable

EConnectionStat...

 

ConnectionState

Protected variable

FLoginSession

 

LoginSession

Protected variable

int

 

MaxDistance

Protected variable

int

 

MinDistance

Protected variable

FOnVoiceChatAft...

 

OnVoiceChatAfterCaptureAudioReadDelegate

Protected variable

FOnVoiceChatAva...

 

OnVoiceChatAvailableAudioDevicesChangedDelegate

Delegates.

Protected variable

FOnVoiceChatBef...

 

OnVoiceChatBeforeCaptureAudioSentDelegate

Protected variable

FOnVoiceChatBef...

 

OnVoiceChatBeforeRecvAudioRenderedDelegate

Protected variable

FOnVoiceChatCal...

 

OnVoiceChatCallStatsUpdatedDelegate

Protected variable

FOnVoiceChatCha...

 

OnVoiceChatChannelExitedDelegate

Protected variable

FOnVoiceChatCha...

 

OnVoiceChatChannelJoinedDelegate

Protected variable

TArray< FOnVoic...

 

OnVoiceChatConnectCompleteDelegates

Completion delegates.

Protected variable

FOnVoiceChatCon...

 

OnVoiceChatConnectedDelegate

Protected variable

TArray< FOnVoic...

 

OnVoiceChatDisconnectCompleteDelegates

Protected variable

FOnVoiceChatDis...

 

OnVoiceChatDisconnectedDelegate

Protected variable

FOnVoiceChatLog...

 

OnVoiceChatLoggedInDelegate

Protected variable

FOnVoiceChatLog...

 

OnVoiceChatLoggedOutDelegate

Protected variable

FOnVoiceChatLog...

 

OnVoiceChatLoginCompleteDelegate

Protected variable

FOnVoiceChatLog...

 

OnVoiceChatLogoutCompleteDelegate

Protected variable

FOnVoiceChatPla...

 

OnVoiceChatPlayerAddedDelegate

Protected variable

FOnVoiceChatPla...

 

OnVoiceChatPlayerMuteUpdatedDelegate

Protected variable

FOnVoiceChatPla...

 

OnVoiceChatPlayerRemovedDelegate

Protected variable

FOnVoiceChatPla...

 

OnVoiceChatPlayerTalkingUpdatedDelegate

Protected variable

FOnVoiceChatPla...

 

OnVoiceChatPlayerVolumeUpdatedDelegate

Protected variable

FOnVoiceChatRec...

 

OnVoiceChatReconnectedDelegate

Protected variable

FOnVoiceChatRec...

 

OnVoiceChatRecordSamplesAvailableDelegate

Protected variable

float

 

Rolloff

Protected variable

VivoxClientApi:...

 

VivoxClientConnection

Protected variable

FString

 

VivoxDomain

Protected variable

FString

 

VivoxInsecureSecret

Protected variable

FString

 

VivoxIssuer

Protected variable

FString

 

VivoxNamespace

Protected variable

FString

 

VivoxServerUrl

Settings.

Constructors

Name Description

Public function

FVivoxVoiceChat()

Destructors

Name Description

Public function Virtual

~FVivoxVoiceChat()

Functions

Name Description

Protected function

void

 

ClearChannelSessions()

Protected function

void

 

ClearLoginSession()

Protected function

VivoxClientA...

 

CreateAccountName

(
    const FString& PlayerName
)

Protected function

VivoxClientA...

 

CreateChannelUri

(
    const FString& ChannelName,
    EVoiceChatChannelType ChannelType,
    TOptional< FVoiceChatChannel3dPrope...
)

Protected function

VivoxClientA...

 

CreateUserUri

(
    const FString& PlayerName
)

Protected function

FString

 

GetChannelNameFromUri

(
    const VivoxClientApi::Uri& Channel...
)

Protected function

FChannelSess...

 

GetChannelSession

(
    const VivoxClientApi::Uri& Channel...
)

Protected function Const

const FChann...

 

GetChannelSession

(
    const FString& ChannelName
)

Protected function

FChannelSess...

 

GetChannelSession

(
    const FString& ChannelName
)

Protected function

EVoiceChatCh...

 

GetChannelTypeFromUri

(
    const VivoxClientApi::Uri& Channel...
)

Protected function Const

const FParti...

 

GetParticipant

(
    const FString& PlayerName
)

Protected function

FParticipant...

 

GetParticipant

(
    const FString& PlayerName
)

Protected function

FString

 

GetPlayerNameFromAccountName

(
    const VivoxClientApi::AccountName&...
)

Protected function

FString

 

GetPlayerNameFromUri

(
    const VivoxClientApi::Uri& UserUri
)

Protected function Virtual

void

 

InvokeOnUIThread

(
    void(Func)(void*Arg0),
    void* Arg0
)

Protected function Virtual

void

 

onAudioUnitAfterCaptureAudioRead

(
    const VivoxClientApi::Uri& Initial...,
    short* PcmFrames,
    int PcmFrameCount,
    int AudioFrameRate,
    int ChannelsPerFrame
)

Protected function Virtual

void

 

onAudioUnitBeforeCaptureAudioSent

(
    const VivoxClientApi::Uri& Initial...,
    short* PcmFrames,
    int PcmFrameCount,
    int AudioFrameRate,
    int ChannelsPerFrame,
    bool bSpeaking
)

Protected function Virtual

void

 

onAudioUnitBeforeRecvAudioRendered

(
    const VivoxClientApi::Uri& Initial...,
    short* PcmFrames,
    int PcmFrameCount,
    int AudioFrameRate,
    int ChannelsPerFrame,
    bool bSilence
)

Protected function Virtual

void

 

onAudioUnitStarted

(
    const VivoxClientApi::Uri& Initial...
)

Protected function Virtual

void

 

onAudioUnitStopped

(
    const VivoxClientApi::Uri& Initial...
)

Protected function Virtual

void

 

onAvailableAudioDevicesChanged()

Protected function Virtual

void

 

onCallStatsUpdated

(
    const VivoxClientApi::AccountName&...,
    vx_call_stats_t& Stats,
    bool bIsFinal
)

Protected function Virtual

void

 

onChannelExited

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...,
    const VivoxClientApi::VCSStatus& R...
)

Protected function Virtual

void

 

onChannelJoined

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...
)

Protected function Virtual

void

 

onChannelJoinFailed

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onConnectCompleted

(
    const VivoxClientApi::Uri& Server
)

Protected function Virtual

void

 

onConnectFailed

(
    const VivoxClientApi::Uri& Server,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onDisconnected

(
    const VivoxClientApi::Uri& Server,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onInvalidChannelCredentials

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...
)

Protected function Virtual

void

 

onInvalidLoginCredentials

(
    const VivoxClientApi::AccountName&...
)

Protected function Virtual

void

 

onLoginCompleted

(
    const VivoxClientApi::AccountName&...
)

Protected function Virtual

void

 

onLoginFailed

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onLogoutCompleted

(
    const VivoxClientApi::AccountName&...
)

Protected function Virtual

void

 

onLogoutFailed

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onLogStatementEmitted

(
    LogLevel Level,
    long long NativeMillisecondsSinceEp...,
    long ThreadId,
    const char* LogMessage
)

Protected function Virtual

void

 

onOperatingSystemChosenAudioInputDeviceChanged

(
    const VivoxClientApi::AudioDeviceId...
)

Protected function Virtual

void

 

onOperatingSystemChosenAudioOutputDeviceChanged

(
    const VivoxClientApi::AudioDeviceId...
)

Protected function Virtual

void

 

onParticipantAdded

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...,
    const VivoxClientApi::Uri& Partici...,
    bool bIsLoggedInUser
)

Protected function Virtual

void

 

onParticipantLeft

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...,
    const VivoxClientApi::Uri& Partici...,
    bool bIsLoggedInUser,
    ParticipantLeftReason Reason
)

Protected function Virtual

void

 

onParticipantUpdated

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...,
    const VivoxClientApi::Uri& Partici...,
    bool bIsLoggedInUser,
    bool bSpeaking,
    double MeterEnergy,
    bool bMutedForAll
)

Protected function Virtual

void

 

onSetApplicationChosenAudioInputDeviceCompleted

(
    const VivoxClientApi::AudioDeviceId...
)

Protected function Virtual

void

 

onSetApplicationChosenAudioInputDeviceFailed

(
    const VivoxClientApi::AudioDeviceId...,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onSetApplicationChosenAudioOutputDeviceCompleted

(
    const VivoxClientApi::AudioDeviceId...
)

Protected function Virtual

void

 

onSetApplicationChosenAudioOutputDeviceFailed

(
    const VivoxClientApi::AudioDeviceId...,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onSetChannelAudioOutputDeviceVolumeCompleted

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...,
    int Volume
)

Protected function Virtual

void

 

onSetChannelAudioOutputDeviceVolumeFailed

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...,
    int Volume,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onSetChannelTransmissionToAllCompleted

(
    const VivoxClientApi::AccountName&...
)

Protected function Virtual

void

 

onSetChannelTransmissionToAllFailed

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onSetChannelTransmissionToNoneCompleted

(
    const VivoxClientApi::AccountName&...
)

Protected function Virtual

void

 

onSetChannelTransmissionToNoneFailed

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onSetChannelTransmissionToSpecificChannelCompleted

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...
)

Protected function Virtual

void

 

onSetChannelTransmissionToSpecificChannelFailed

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Channel...,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onSetParticipantAudioOutputDeviceVolumeForMeCompleted

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& TargetU...,
    const VivoxClientApi::Uri& Channel...,
    int Volume
)

Protected function Virtual

void

 

onSetParticipantAudioOutputDeviceVolumeForMeFailed

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& TargetU...,
    const VivoxClientApi::Uri& Channel...,
    int Volume,
    const VivoxClientApi::VCSStatus& S...
)

Protected function Virtual

void

 

onSetParticipantMutedForMeCompleted

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Target,
    const VivoxClientApi::Uri& Channel...,
    bool bMuted
)

Protected function Virtual

void

 

onSetParticipantMutedForMeFailed

(
    const VivoxClientApi::AccountName&...,
    const VivoxClientApi::Uri& Target,
    const VivoxClientApi::Uri& Channel...,
    bool bMuted,
    const VivoxClientApi::VCSStatus& S...
)

Protected function

void

 

RemoveChannelSession

(
    const FString& ChannelName
)

Protected function Virtual

void

 

SetVivoxSdkConfigHints

(
    vx_sdk_config_t& Hints
)

Protected function Static

FString

 

ToString

(
    EConnectionState State
)

Protected function Static

FString

 

ToString

(
    FLoginSession::EState State
)

Protected function Static

FString

 

ToString

(
    FChannelSession::EState State
)

Overridden from FExec

Name Description

Protected function Virtual

bool

 

Exec

(
    UWorld* InWorld,
    const TCHAR* Cmd,
    FOutputDevice& Ar
)

Exec handler

Overridden from IVoiceChat

Name Description

Public function Virtual

void

 

BlockPlayers

(
    const TArray< FString >& PlayerNam...
)

Block communication with players

Public function Virtual

void

 

Connect

(
    const FOnVoiceChatConnectCompleteDe...
)

Connect to a voice server

Public function Virtual

void

 

Disconnect

(
    const FOnVoiceChatDisconnectComplet...
)

Disconnect from a voice server

Public function Virtual Const

bool

 

GetAudioInputDeviceMuted()

Is the input device muted?

Public function Virtual Const

float

 

GetAudioInputVolume()

Get volume of audio input device

Public function Virtual Const

bool

 

GetAudioOutputDeviceMuted()

Is the output device muted?

Public function Virtual Const

float

 

GetAudioOutputVolume()

Get volume of audio output device

Public function Virtual Const

TArray< FStr...

 

GetAvailableInputDevices()

Get a list of available audio input devices

Public function Virtual Const

TArray< FStr...

 

GetAvailableOutputDevices()

Get a list of available audio output devices

Public function Virtual Const

TArray< FStr...

 

GetChannels()

Get an array of channels the user is in

Public function Virtual Const

EVoiceChatCh...

 

GetChannelType

(
    const FString& ChannelName
)

Get an array of players in a channel

Public function Virtual Const

FString

 

GetDefaultInputDevice()

Get the default audio input device

Public function Virtual Const

FString

 

GetDefaultOutputDevice()

Get the default audio output device

Public function Virtual Const

FString

 

GetInputDevice()

Get the audio input device that is being used

Public function Virtual Const

FString

 

GetLoggedInPlayerName()

Get the player name used to log in

Public function Virtual Const

FString

 

GetOutputDevice()

Get the audio output device that is being used

Public function Virtual Const

TArray< FStr...

 

GetPlayersInChannel

(
    const FString& ChannelName
)

Get an array of players in a channel

Public function Virtual Const

float

 

GetPlayerVolume

(
    const FString& PlayerName
)

Public function Virtual Const

FString

 

GetTransmitChannel()

Get the specific channel we are transmitting to

Public function Virtual Const

EVoiceChatTr...

 

GetTransmitMode()

Get the current transmit mode

Public function Virtual

bool

 

Initialize()

Initialize VoiceChat

Public function Virtual

FString

 

InsecureGetJoinToken

(
    const FString& ChannelName,
    EVoiceChatChannelType ChannelType,
    TOptional< FVoiceChatChannel3dPrope...
)

Public function Virtual

FString

 

InsecureGetLoginToken

(
    const FString& PlayerName
)

Generate Login/Join tokens. Should be used for development purposes only

Public function Virtual Const

bool

 

IsConnected()

Are we connected to the voice server?

Public function Virtual Const

bool

 

IsConnecting()

Are we connecting to the voice server?

Public function Virtual Const

bool

 

IsInitialized()

Is voice chat initialized?

Public function Virtual Const

bool

 

IsLoggedIn()

Are we logged in?

Public function Virtual Const

bool

 

IsLoggingIn()

Are we logging in?

Public function Virtual Const

bool

 

IsPlayerMuted

(
    const FString& PlayerName
)

Public function Virtual Const

bool

 

IsPlayerTalking

(
    const FString& PlayerName
)

Public function Virtual

void

 

JoinChannel

(
    const FString& ChannelName,
    const FString& ChannelCredentials,
    EVoiceChatChannelType ChannelType,
    const FOnVoiceChatChannelJoinComple...,
    TOptional< FVoiceChatChannel3dPrope...
)

Join a voice channel

Public function Virtual

void

 

LeaveChannel

(
    const FString& ChannelName,
    const FOnVoiceChatChannelLeaveCompl...
)

Leave a voice channel

Public function Virtual

void

 

Login

(
    FPlatformUserId PlatformId,
    const FString& PlayerName,
    const FString& Credentials,
    const FOnVoiceChatLoginCompleteDele...
)

Login to the connected voice server

Public function Virtual

void

 

Logout

(
    const FOnVoiceChatLogoutCompleteDel...
)

Logout from the connected voice server

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatAvailableAudioDevicesChanged()

Delegate broadcast whenever the available audio devices change.

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatCallStatsUpdated()

Delegate triggered when a call is ended, providing the stats for the call.

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatChannelExited()

Delegate triggered when we leave a voice channel

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatChannelJoined()

Delegate triggered when we join a voice channel

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatConnected()

Delegate triggered when we are connected to voice chat

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatDisconnected()

Delegate triggered when we are disconnected from voice chat

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatLoggedIn()

Delegate triggered when we are logged in to voice chat

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatLoggedOut()

Delegate triggered when we are logged out from voice chat

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatPlayerAdded()

Delegate triggered when a player is added to a channel

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatPlayerMuteUpdated()

Delegate triggered when a player's muted state is updated, usually as a result of calling SetPlayerMuted

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatPlayerRemoved()

Delegate triggered when a player is removed from a channel

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatPlayerTalkingUpdated()

Delegate triggered when a player's talking state is updated

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatPlayerVolumeUpdated()

Delegate triggered when a player's volume is updated, usually as a result of calling SetPlayerVolume

Public function Virtual

FOnVoiceChat...

 

OnVoiceChatReconnected()

Delegate triggered when we are reconnected to voice chat in cases where the underlying implementation disconnected and then reconnected.

Public function Virtual

FDelegateHan...

 

RegisterOnVoiceChatAfterCaptureAudioReadDelegate

(
    const FOnVoiceChatAfterCaptureAudio...
)

Delegates called from audio thread.

Public function Virtual

FDelegateHan...

 

RegisterOnVoiceChatBeforeCaptureAudioSentDelegate

(
    const FOnVoiceChatBeforeCaptureAudi...
)

Public function Virtual

FDelegateHan...

 

RegisterOnVoiceChatBeforeRecvAudioRenderedDelegate

(
    const FOnVoiceChatBeforeRecvAudioRe...
)

Public function Virtual

void

 

Set3DPosition

(
    const FString& ChannelName,
    const FVector& SpeakerPosition,
    const FVector& ListenerPosition,
    const FVector& ListenerForwardDire...,
    const FVector& ListenerUpDirection
)

Set the 3d position of the player

Public function Virtual

void

 

SetAudioInputDeviceMuted

(
    bool bIsMuted
)

Mute or unmute the audio input device

Public function Virtual

void

 

SetAudioInputVolume

(
    float Volume
)

Set record volume

Public function Virtual

void

 

SetAudioOutputDeviceMuted

(
    bool bIsMuted
)

Mute or unmute the audio output device

Public function Virtual

void

 

SetAudioOutputVolume

(
    float Volume
)

Set playback volume

Public function Virtual

void

 

SetInputDevice

(
    const FString& InputDevice
)

Set the audio input device to use

Public function Virtual

void

 

SetOutputDevice

(
    const FString& OutputDevice
)

Set the audio output device to use

Public function Virtual

void

 

SetPlayerMuted

(
    const FString& PlayerName,
    bool bMuted
)

Mute or unmute a player

Public function Virtual

void

 

SetPlayerVolume

(
    const FString& PlayerName,
    float Volume
)

Set player volume

Public function Virtual

FDelegateHan...

 

StartRecording

(
    const FOnVoiceChatRecordSamplesAvai...
)

Start recording

Public function Virtual

void

 

StopRecording

(
    FDelegateHandle Handle
)

Stop recording

Public function Virtual

void

 

TransmitToAllChannels()

Transmit to all channels that you are currently in

Public function Virtual

void

 

TransmitToNoChannels()

Stop transmitting to all channels that you are currently in.

Public function Virtual

void

 

TransmitToSpecificChannel

(
    const FString& ChannelName
)

Transmit to a specific channel

Public function Virtual

void

 

UnblockPlayers

(
    const TArray< FString >& PlayerNam...
)

Unblock communication with players

Public function Virtual

bool

 

Uninitialize()

Uninitialize VoiceChat

Public function Virtual

void

 

UnregisterOnVoiceChatAfterCaptureAudioReadDelegate

(
    FDelegateHandle Handle
)

Public function Virtual

void

 

UnregisterOnVoiceChatBeforeCaptureAudioSentDelegate

(
    FDelegateHandle Handle
)

Public function Virtual

void

 

UnregisterOnVoiceChatBeforeRecvAudioRenderedDelegate

(
    FDelegateHandle Handle
)

Classes

Enums

Name

Description

Protected enum

EConnectionState

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback