Navigation
API > API/Runtime > API/Runtime/AudioMixer
FQuartzClock: This class receives, schedules, and fires quantized commands. The underlying FQuartzMetronome handles all counting / timing logic.
This class gets ticked externally (i.e. by some Clock Manager) and counts down the time-to-fire the commands in audio frames.
UpdateCachedState() updates a game-thread copy of data accessed via FQuartzClockProxy (see FQuartzClockState)
| Name | FQuartzClock |
| Type | class |
| Header File | /Engine/Source/Runtime/AudioMixer/Public/Quartz/AudioMixerClock.h |
| Include Path | #include "Quartz/AudioMixerClock.h" |
Syntax
class FQuartzClock : public FQuartzClockCommandQueueType::TConsumerBase< Audio::Quartz::IQuartzClock >
Inheritance Hierarchy
- FQuartzClockCommandQueueType::TConsumerBase< Audio::Quartz::IQuartzClock > → FQuartzClock
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FQuartzClock () |
Don't allow default ctor, a clock needs to be ready to be used by the clock manager / FMixerDevice once constructed | Quartz/AudioMixerClock.h | |
FQuartzClock
(
const FName& InName, |
Ctor | Quartz/AudioMixerClock.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FQuartzClock() |
Dtor | Quartz/AudioMixerClock.h |
Structs
| Name | Remarks |
|---|---|
| FQuartzClockState | Data is cached when an FQuartzClock is ticked |
| PendingCommand | Contains the pending command and the number of frames it has to wait to fire. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIgnoresFlush | bool | Quartz/AudioMixerClock.h | ||
| bIsRunning | FThreadSafeBool | Quartz/AudioMixerClock.h | ||
| CachedClockState | Audio::FQuartzClock::FQuartzClockState | Quartz/AudioMixerClock.h | ||
| CachedClockStateCritSec | FCriticalSection | Mutex-protected update at the end of Tick() | Quartz/AudioMixerClock.h | |
| ClockAlteringPendingCommands | TArray< PendingCommand > | Container of external commands to be executed (TUniquePointer |
Quartz/AudioMixerClock.h | |
| Metronome | FQuartzMetronome | Quartz/AudioMixerClock.h | ||
| Name | FName | Quartz/AudioMixerClock.h | ||
| OwningClockManagerPtr | FQuartzClockManager * | Quartz/AudioMixerClock.h | ||
| PendingCommands | TArray< PendingCommand > | Quartz/AudioMixerClock.h | ||
| PreTickCommands | FQuartzClockCommandQueuePtr | Command queue handed out to GameThread objects to queue commands. These get executed at the top of Tick() | Quartz/AudioMixerClock.h | |
| ThreadLatencyInMilliseconds | float | Quartz/AudioMixerClock.h | ||
| TickDelayLengthInFrames | int32 | Quartz/AudioMixerClock.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddQuantizedCommand
(
FQuartzQuantizationBoundary InQuantizationBoundary, |
Quartz/AudioMixerClock.h | ||
virtual void AddQuantizedCommand
(
FQuartzQuantizedCommandInitInfo& InQuantizationCommandInitInfo |
Quartz/AudioMixerClock.h | ||
virtual void AddQuantizedCommand
(
FQuartzQuantizedRequestData& InQuantizedRequestData |
Quantized Command Management: | Quartz/AudioMixerClock.h | |
void AddToTickDelay
(
int32 NumFramesOfDelayToAdd |
(used for StartOtherClock command to handle the sub-tick as the target clock) | Quartz/AudioMixerClock.h | |
bool CancelQuantizedCommand
(
TSharedPtr< IQuartzQuantizedCommand > InCommandPtr |
Quartz/AudioMixerClock.h | ||
void ChangeTickRate
(
FQuartzClockTickRate InNewTickRate, |
Transport Control: alter the tick rate (take by-value to make sample-rate adjustments in-place) | Quartz/AudioMixerClock.h | |
void ChangeTimeSignature
(
const FQuartzTimeSignature& InNewTimeSignature |
Quartz/AudioMixerClock.h | ||
bool DoesMatchSettings
(
const FQuartzClockSettings& InClockSettings |
Quartz/AudioMixerClock.h | ||
float GetBeatProgressPercent
(
const EQuartzCommandQuantization& QuantizationType |
Quartz/AudioMixerClock.h | ||
FQuartzClockManager * GetClockManager() |
Quartz/AudioMixerClock.h | ||
FQuartzClockCommandQueueWeakPtr GetCommandQueue() |
Quartz/AudioMixerClock.h | ||
FQuartzTransportTimeStamp GetCurrentTimestamp() |
Quartz/AudioMixerClock.h | ||
float GetDurationOfQuantizationTypeInSeconds
(
const EQuartzCommandQuantization& QuantizationType, |
Quartz/AudioMixerClock.h | ||
float GetEstimatedRunTime() |
Quartz/AudioMixerClock.h | ||
FMixerDevice * GetMixerDevice() |
Quartz/AudioMixerClock.h | ||
FName GetName() |
Quartz/AudioMixerClock.h | ||
FMixerSourceManager * GetSourceManager() |
Quartz/AudioMixerClock.h | ||
FQuartzClockTickRate GetTickRate() |
Getters: | Quartz/AudioMixerClock.h | |
bool HasPendingEvents() |
Quartz/AudioMixerClock.h | ||
bool IgnoresFlush() |
Quartz/AudioMixerClock.h | ||
bool IsRunning() |
Quartz/AudioMixerClock.h | ||
void LowResolutionTick
(
float InDeltaTimeSeconds |
Low-resolution clock update (not sample-accurate!, useful when running without an Audio Device) | Quartz/AudioMixerClock.h | |
int32 NumPendingEvents() |
Quartz/AudioMixerClock.h | ||
virtual void Pause() |
Quartz/AudioMixerClock.h | ||
void ResetTransport
(
const int32 NumFramesToTickBeforeReset |
Quartz/AudioMixerClock.h | ||
virtual void Restart
(
bool bPause |
Quartz/AudioMixerClock.h | ||
virtual void Resume() |
Quartz/AudioMixerClock.h | ||
void SetSampleRate
(
float InNewSampleRate |
Quartz/AudioMixerClock.h | ||
void SetTickDelay
(
int32 NumFramesOfDelay |
(used for StartOtherClock command to handle the sub-tick as the target clock) | Quartz/AudioMixerClock.h | |
void Shutdown() |
Quartz/AudioMixerClock.h | ||
virtual void Stop
(
bool CancelPendingEvents |
Quartz/AudioMixerClock.h | ||
virtual void SubscribeToAllTimeDivisions
(
FQuartzGameThreadSubscriber InSubscriber |
Quartz/AudioMixerClock.h | ||
virtual void SubscribeToTimeDivision
(
FQuartzGameThreadSubscriber InSubscriber, |
Metronome Event Subscription: | Quartz/AudioMixerClock.h | |
void Tick
(
int32 InNumFramesUntilNextTick |
Sample accurate clock update | Quartz/AudioMixerClock.h | |
virtual void UnsubscribeFromAllTimeDivisions
(
FQuartzGameThreadSubscriber InSubscriber |
Quartz/AudioMixerClock.h | ||
virtual void UnsubscribeFromTimeDivision
(
FQuartzGameThreadSubscriber InSubscriber, |
Quartz/AudioMixerClock.h |