UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Audio::FQuartzClockProxy Class Reference

#include <AudioMixerClock.h>

Public Member Functions

 FQuartzClockProxy ()
 
 FQuartzClockProxy (const FName &Name)
 
UE_API FQuartzClockProxy (TSharedPtr< FQuartzClock, ESPMode::ThreadSafe > InClock)
 
FName GetClockName () const
 
UE_API bool IsValid () const
 
 operator bool () const
 
bool operator== (const FName &Name) const
 
UE_API bool DoesClockExist () const
 
UE_API bool IsClockRunning () const
 
UE_API Audio::FQuartzClockTickRate GetTickRate () const
 
UE_API float GetEstimatedClockRunTimeSeconds () const
 
UE_API FQuartzTransportTimeStamp GetCurrentClockTimestamp () const
 
UE_API float GetDurationOfQuantizationTypeInSeconds (const EQuartzCommandQuantization &QuantizationType, float Multiplier) const
 
UE_API float GetBeatProgressPercent (const EQuartzCommandQuantization &QuantizationType) const
 
UE_API bool SendCommandToClock (TFunction< void(FQuartzClock *)> InCommand)
 
 operator const FName & () const
 

Protected Attributes

TWeakPtr< FQuartzClock, ESPMode::ThreadSafeClockWeakPtr
 

Detailed Description

FQuartzClockProxy:

This class is a C++ handle to the underlying clock.

It is mostly a wrapper around a TWeakPtr<FQuartzClock> and
FQuartzClockCommandQueueType

The getters query the underlying FQuartzClock directly,
which returns values updated during the last audio-engine tick

If you need to add more getters, add copies of the members in question to
FQuartzClock::FQuartzClockState and update FQuartzClock::UpdateCachedState()
for thread-safe access (or manually protect access w/ CachedClockStateCritSec)

SendCommandToClock() can be used to execute lambdas at the beginning
of the next clock tick.  These lambdas can call FQuartzClock's public methods safely.

Your lambda will take an FQuartzClock* as an argument, which will be passed in by the
FQuartzClock itself when it pumps the command queue.

Constructor & Destructor Documentation

◆ FQuartzClockProxy() [1/3]

Audio::FQuartzClockProxy::FQuartzClockProxy ( )
inline

◆ FQuartzClockProxy() [2/3]

Audio::FQuartzClockProxy::FQuartzClockProxy ( const FName Name)
inline

◆ FQuartzClockProxy() [3/3]

Audio::FQuartzClockProxy::FQuartzClockProxy ( TSharedPtr< FQuartzClock, ESPMode::ThreadSafe InClock)

Member Function Documentation

◆ DoesClockExist()

bool Audio::FQuartzClockProxy::DoesClockExist ( ) const

◆ GetBeatProgressPercent()

float Audio::FQuartzClockProxy::GetBeatProgressPercent ( const EQuartzCommandQuantization QuantizationType) const

◆ GetClockName()

FName Audio::FQuartzClockProxy::GetClockName ( ) const
inline

◆ GetCurrentClockTimestamp()

FQuartzTransportTimeStamp Audio::FQuartzClockProxy::GetCurrentClockTimestamp ( ) const

◆ GetDurationOfQuantizationTypeInSeconds()

float Audio::FQuartzClockProxy::GetDurationOfQuantizationTypeInSeconds ( const EQuartzCommandQuantization QuantizationType,
float  Multiplier 
) const

◆ GetEstimatedClockRunTimeSeconds()

float Audio::FQuartzClockProxy::GetEstimatedClockRunTimeSeconds ( ) const

◆ GetTickRate()

Audio::FQuartzClockTickRate Audio::FQuartzClockProxy::GetTickRate ( ) const

◆ IsClockRunning()

bool Audio::FQuartzClockProxy::IsClockRunning ( ) const

◆ IsValid()

bool Audio::FQuartzClockProxy::IsValid ( ) const

◆ operator bool()

Audio::FQuartzClockProxy::operator bool ( ) const
inline

◆ operator const FName &()

Audio::FQuartzClockProxy::operator const FName & ( ) const
inline

◆ operator==()

bool Audio::FQuartzClockProxy::operator== ( const FName Name) const
inline

◆ SendCommandToClock()

bool Audio::FQuartzClockProxy::SendCommandToClock ( TFunction< void(FQuartzClock *)>  InCommand)

Member Data Documentation

◆ ClockWeakPtr

TWeakPtr<FQuartzClock, ESPMode::ThreadSafe> Audio::FQuartzClockProxy::ClockWeakPtr
protected

The documentation for this class was generated from the following files: