FQuartzClock

Class that encapsulates sample-accurate timing logic, as well as firing QuantizedAudioCommands.

Choose your operating system:

Windows

macOS

Linux

References

Module

AudioMixer

Header

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

Include

#include "Quartz/AudioMixerClock.h"

Syntax

class FQuartzClock

Remarks

Class that encapsulates sample-accurate timing logic, as well as firing QuantizedAudioCommands.

Constructors

Name Description

Public function

FQuartzClock

(
    const FName& InName,
    const FQuartzClockSettings& InCloc...,
    FQuartzClockManager* InOwningC...
)

Ctor

Destructors

Name Description

Public function

~FQuartzClock()

Dtor

Functions

Name Description

Public function

void

 

AddQuantizedCommand

Add a new event to be triggered by this clock TODO: return a handle to this event so "looping" events can be canceled

Public function

void

 

AddToTickDelay

(
    int32 NumFramesOfDelayToAdd
)

Public function

bool

 

CancelQuantizedCommand

Cancel pending command.

Public function

void

 

ChangeTickRate

(
    FQuartzClockTickRate InNewTickRate,
    int32 NumFramesLeft
)

Alter the tick rate (take by-value to make sample-rate adjustments in-place)

Public function

void

 

ChangeTimeSignature

(
    const FQuartzTimeSignature& InNewT...
)

Alter the time signature

Public function Const

bool

 

DoesMatchSettings

(
    const FQuartzClockSettings& InCloc...
)

Does this clock match the provided settings.

Public function

FQuartzClock...

 

GetClockManager()

Public function

FQuartzTrans...

 

GetCurrentTimestamp()

Returns the current location of the clock in the transport.

Public function

float

 

GetDurationOfQuantizationTypeInSeconds

(
    const EQuartzCommandQuantization& ...,
    float Multiplier
)

Returns the duration in seconds of the given Quantization Type.

Public function

float

 

GetEstimatedRunTime()

Returns the amount of time, in seconds, the clock has been running. Caution: due to latency, this will not be perfectly accurate.

Public function

FMixerDevice...

 

GetMixerDevice()

Public function Const

FName

 

GetName()

Get the identifier of the clock

Public function

FMixerSource...

 

GetSourceManager()

Public function Const

FQuartzClock...

 

GetTickRate()

Get the tick rate

Public function Const

bool

 

HasPendingEvents()

Does the clock have any pending events

Public function

bool

 

IgnoresFlush()

Clock will persist across level changes

Public function

bool

 

IsRunning()

Is the clock currently ticking?

Public function

void

 

LowResolutionTick

(
    float InDeltaTimeSeconds
)

Low-resolution clock update (not sample-accurate!, useful when running without an Audio Device)

Public function Const

int32

 

NumPendingEvents()

Public function

void

 

Pause()

Stop ticking the clock

Public function

void

 

ResetTransport()

Public function

void

 

Restart

(
    bool bPause
)

Reset the metronome

Public function

void

 

Resume()

Start ticking the clock

Public function

void

 

SetSampleRate

(
    float InNewSampleRate
)

Set the sample rate of the clock.

Public function

void

 

SetTickDelay

(
    int32 NumFramesOfDelay
)

Public function

void

 

Shutdown()

Shutdown

Public function

void

 

Stop

(
    bool CancelPendingEvents
)

Stop ticking and reset the clock

Public function

void

 

SubscribeToAllTimeDivisions

(
    MetronomeCommandQueuePtr InListener...
)

Public function

void

 

SubscribeToTimeDivision

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

Public function

void

 

Tick

(
    int32 InNumFramesUntilNextTick
)

Sample accurate clock update

Public function

void

 

UnsubscribeFromAllTimeDivisions

(
    MetronomeCommandQueuePtr InListener...
)

Public function

void

 

UnsubscribeFromTimeDivision

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