FVoiceEngineImpl

Generic implementation of voice engine, using Voice module for capture/codec

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

OnlineSubsystemUtils

Header

/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Public/VoiceEngineImpl.h

Include

#include "VoiceEngineImpl.h"

Syntax

class FVoiceEngineImpl :
    public IVoiceEngine,
    public FSelfRegisteringExec,
    public IDeviceChangedListener

Remarks

Generic implementation of voice engine, using Voice module for capture/codec

Constructors

Name Description

Protected function

FVoiceEngineImpl()

Constructor

Public function

FVoiceEngineImpl

(
    IOnlineSubsystem* InSubsystem
)

Destructors

Name Description

Public function Virtual

~FVoiceEngineImpl()

Functions

Name Description

Protected function Virtual

void

 

CreateSerializeHelper()

Protected function Virtual

TArray< uint...

 

GetCompressedVoiceBuffer()

Protected function Virtual

TArray< uint...

 

GetDecompressedVoiceBuffer()

Protected function Virtual

FLocalVoiceD...

 

GetLocalPlayerVoiceData()

Protected function Virtual

int32

 

GetMaxVoiceRemainderSize()

Protected function Virtual

IOnlineSubsy...

 

GetOnlineSubSystem()

Protected function Virtual

FRemoteTalke...

 

GetRemoteTalkerBuffers()

Protected function Virtual Const

const TShare...

 

GetVoiceCapture()

Protected function Virtual

TSharedPtr< ...

 

GetVoiceCapture()

Protected function Virtual Const

const TShare...

 

GetVoiceEncoder()

Protected function Virtual

TSharedPtr< ...

 

GetVoiceEncoder()

Public function Virtual

void

 

GetVoiceSettingsOverride

(
    const FUniqueNetIdWrapper& RemoteT...,
    FVoiceSettings& VoiceSettings
)

Protected function Virtual

bool

 

IsOwningUser

(
    uint32 UserIndex
)

Get Audio Device Changes on Windows.

Protected function Virtual Const

bool

 

IsRecording()

Protected function Virtual Const

void

 

StartRecording()

Start capturing voice data

Protected function Virtual Const

void

 

StoppedRecording()

Called when "last half second" is over

Protected function Virtual Const

void

 

StopRecording()

Stop capturing voice data

Overridden from IVoiceEngine

Name Description

Public function Virtual Const

uint32

 

GetVoiceDataReadyFlags()

Returns which local talkers have data ready to be read from the voice system

Public function Virtual Const

FString

 

GetVoiceDebugState()

Get information about the voice state for display

Protected function Virtual

bool

 

Init

(
    int32 MaxLocalTalkers,
    int32 MaxRemoteTalkers
)

IVoiceEngine.

Public function Virtual

bool

 

IsHeadsetPresent

(
    uint32 LocalUserNum
)

Checks whether a local user index has a headset present or not

Public function Virtual

bool

 

IsLocalPlayerTalking

(
    uint32 LocalUserNum
)

Determines whether a local user index is currently talking or not

Public function Virtual

bool

 

IsRemotePlayerTalking

(
    const FUniqueNetId& UniqueId
)

Determines whether a remote talker is currently talking or not

Public function Virtual

uint32

 

ReadLocalVoiceData

(
    uint32 LocalUserNum,
    uint8* Data,
    uint32* Size,
    uint64* OutSampleCount
)

Public function Virtual

uint32

 

ReadLocalVoiceData

(
    uint32 LocalUserNum,
    uint8* Data,
    uint32* Size
)

Reads local voice data for the specified local talker.

Public function Virtual

uint32

 

RegisterLocalTalker

(
    uint32 LocalUserNum
)

Registers the user index as a local talker (interested in voice data)

Public function Virtual

uint32

 

RegisterRemoteTalker

(
    const FUniqueNetId& UniqueId
)

Registers the unique player id as a remote talker (submitted voice data only)

Public function Virtual

uint32

 

SetPlaybackPriority

(
    uint32 LocalUserNum,
    const FUniqueNetId& RemoteTalkerId,
    uint32 Priority
)

Sets the playback priority of a remote talker for the given user.

Public function Virtual

uint32

 

StartLocalVoiceProcessing

(
    uint32 LocalUserNum
)

IVoiceEngine.

Public function Virtual

uint32

 

StartRemoteVoiceProcessing

(
    const FUniqueNetId& UniqueId
)

Starts remote voice processing for the specified user

Public function Virtual

uint32

 

StopLocalVoiceProcessing

(
    uint32 LocalUserNum
)

Stops local voice processing for the specified user index

Public function Virtual

uint32

 

StopRemoteVoiceProcessing

(
    const FUniqueNetId& UniqueId
)

Stops remote voice processing for the specified user

Public function Virtual

uint32

 

SubmitRemoteVoiceData

(
    const FUniqueNetId& RemoteTalkerId,
    uint8* Data,
    uint32* Size
)

Submits remote voice data for playback by the voice system.

Public function Virtual

uint32

 

SubmitRemoteVoiceData

(
    const FUniqueNetIdWrapper& RemoteT...,
    uint8* Data,
    uint32* Size,
    uint64& InSampleCount
)

Public function Virtual

void

 

Tick

(
    float DeltaTime
)

Allows for platform specific servicing of devices, etc.

Public function Virtual

uint32

 

UnregisterLocalTalker

(
    uint32 LocalUserNum
)

Unregisters the user index as a local talker (not interested in voice data)

Public function Virtual

uint32

 

UnregisterRemoteTalker

(
    const FUniqueNetId& UniqueId
)

Unregisters the unique player id as a remote talker

Overridden from FExec

Name Description

Public function Virtual

bool

 

Exec

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

FSelfRegisteringExec.

Overridden from IDeviceChangedListener

Name Description

Protected function Virtual

void

 

OnDefaultDeviceChanged()

Get Audio Device Changes on Windows.

Protected function Virtual

void

 

OnDeviceRemoved

(
    FString DeviceID
)

Typedefs

Name

Description

FRemoteTalkerData

Mapping of UniqueIds to the incoming voice data and their audio component

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