FAudioThread

Windows
MacOS
Linux

Inheritance Hierarchy

FRunnable

FAudioThread

Syntax

class FAudioThread : public FRunnable

Constructors

Name Description

Public function

FAudioThread()

Destructors

Name Description

Public function Virtual

~FAudioThread()

Functions

Name Description

Public function Static

FString

 

GetCurrentAudioThreadStatId()

Retrieves the current audio thread stat id.

Public function Static

void

 

GetLongestTaskInfo

(
    FString& OutLongestTask,
    double& OutLongestTaskTimeMs
)

Public function Static

bool

 

IsAudioThreadRunning()

Public function Static

bool

 

IsUsingThreadedAudio()

Public function Static

void

 

ProcessAllCommands()

Processes all enqueued audio thread commands.

Public function Static

void

 

ResetAudioThreadTimers()

Public function Static

void

 

ResumeAudioThread()

Public function Static

void

 

RunCommandOnAudioThread

(
    TFunction< void()> InFunction,
    const TStatId InStatId
)

Execute a command on the audio thread.

Public function Static

void

 

RunCommandOnGameThread

(
    TFunction< void()> InFunction,
    const TStatId InStatId
)

Execute a (presumably audio) command on the game thread.

Public function Static

void

 

SetUseThreadedAudio

(
    bool bInUseThreadedAudio
)

Public function Static

void

 

StartAudioThread()

Starts the audio thread.

Public function Static

void

 

StopAudioThread()

Stops the audio thread.

Public function Static

void

 

SuspendAudioThread()

Overridden from FRunnable

Name Description

Public function Virtual

void

 

Exit()

Exits the runnable object.

Public function Virtual

bool

 

Init()

Initializes the runnable object.

Public function Virtual

uint32

 

Run()

Runs the runnable object.

Constants

Name

Description

AudioThreadRunnable

The audio thread itself.

bIsAudioThreadRunning

Whether the audio thread is currently running If this is false, then we have no audio thread and audio commands will be issued directly on the game thread

bIsAudioThreadSuspended

bUseThreadedAudio

Whether to run with an audio thread

CachedAudioThreadId

The stashed value of the audio thread as we clear it during GC

CurrentAudioThreadStatId

Stat id of the currently executing audio thread command.

CurrentAudioThreadStatIdCS

LongestAudioThreadStatId

LongestAudioThreadTimeMsec

References

Module

Engine

Header

Runtime/Engine/Public/AudioThread.h

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