FQuartzClockManager

Class that owns, updates, and provides access to all active clocks All methods are thread-safe.

Windows
MacOS
Linux

Inheritance Hierarchy

FQuartLatencyTracker

FQuartzClockManager

References

Module

AudioMixer

Header

/Engine/Source/Runtime/AudioMixer/Public/Quartz/AudioMixerClockManager.h

Include

#include "Quartz/AudioMixerClockManager.h"

Syntax

class FQuartzClockManager : public FQuartLatencyTracker

Remarks

Class that owns, updates, and provides access to all active clocks All methods are thread-safe. The method locks if it returns a value, and stages a command if it returns void

Constructors

Name Description

Public function

FQuartzClockManager

(
    Audio::FMixerDevice* InOwner
)

Ctor

Destructors

Name Description

Public function

~FQuartzClockManager()

Dtor

Functions

Name Description

Public function

FQuartzQuant...

 

AddCommandToClock

Add a new command to a given clock safe to call from AudioThread (uses Audio Render Thread command)

Public function

bool

 

CancelCommandOnClock

(
    FName InOwningClockName,
    TSharedPtr< IQuartzQuantizedCommand...
)

Cancel a queued command on a clock (i.e. cancel a PlayQuantized command if the sound is stopped before it is played)

Public function

bool

 

DoesClockExist

(
    const FName& InClockName
)

Returns true if a clock with the given name already exists.

Public function

void

 

Flush()

Shutdown all clocks that don't ignore Flush() (i.e. level change)

Public function

float

 

GetDurationOfQuantizationTypeInSeconds

(
    const FName& InClockName,
    const EQuartzCommandQuantization& ...,
    float Multiplier
)

Returns the duration in seconds of the given Quantization Type, or -1 if the Clock is invalid or nonexistent.

Public function

int32

 

GetLastUpdateSizeInFrames()

Public function Const

FMixerDevice...

 

GetMixerDevice()

Get access to the owning FMixerDevice

Public function Const

int32

 

GetNumClocks()

Public function

TSharedPtr< ...

 

GetOrCreateClock

(
    const FName& InClockName,
    const FQuartzClockSettings& InCloc...,
    bool bOverrideTickRateIfClockExists
)

Add (and take ownership of) a new clock safe to call from AudioThread (uses critical section)

Public function

FQuartzClock...

 

GetTickRateForClock

(
    const FName& InName
)

Get Tick rate for clock safe to call from AudioThread (uses critical section)

Public function

bool

 

HasClockBeenTickedThisUpdate

(
    FName InClockName
)

Public function

bool

 

IsClockRunning

(
    const FName& InClockName
)

Returns true if the name is running

Public function

void

 

LowResoultionUpdate

(
    float DeltaTimeSeconds
)

Can be called from any thread for low-resolution clock updates (i.e. used when running without an audio device) not sample-accurate!

Public function

void

 

PauseClock

(
    const FName& InName
)

Stop the given clock safe to call from AudioThread (uses Audio Render Thread command)

Public function

void

 

RemoveClock

(
    const FName& InName
)

Remove existing clock safe to call from AudioThread (uses Audio Render Thread Command)

Public function

void

 

ResumeClock

(
    const FName& InName,
    int32 NumFramesToDelayStart
)

Start the given clock safe to call from AudioThread (uses Audio Render Thread command)

Public function

void

 

SetTickRateForClock

(
    const FQuartzClockTickRate& InNewT...,
    const FName& InName
)

Public function

void

 

Shutdown()

Stop all clocks and cancel all pending events

Public function

void

 

StopClock

(
    const FName& InName,
    bool CancelPendingEvents
)

Stop the given clock safe to call from AudioThread (uses Audio Render Thread command)

Public function

void

 

SubscribeToAllTimeDivisions

(
    FName InClockName,
    MetronomeCommandQueuePtr InListener...
)

Subscribe to all time divisions on a clock

Public function

void

 

SubscribeToTimeDivision

(
    FName InClockName,
    MetronomeCommandQueuePtr InListener...,
    EQuartzCommandQuantization InQuanti...
)

Subscribe to a specific time division on a clock

Public function

void

 

UnsubscribeFromAllTimeDivisions

(
    FName InClockName,
    MetronomeCommandQueuePtr InListener...
)

Un-subscribe from all time divisions on a specific clock

Public function

void

 

UnsubscribeFromTimeDivision

(
    FName InClockName,
    MetronomeCommandQueuePtr InListener...,
    EQuartzCommandQuantization InQuanti...
)

Un-subscribe from a specific time division on a clock

Public function

void

 

Update

(
    int32 NumFramesUntilNextUpdate
)

Called on AudioRenderThread.

Public function

void

 

UpdateClock

(
    FName InClockToAdvance,
    int32 NumFramesToAdvance
)

Called on AudioRenderThread.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss