Navigation
API > API/Runtime > API/Runtime/AudioMixer > API/Runtime/AudioMixer/Quartz
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
| Type | Name | Description | |
|---|---|---|---|
FQuartzClockManager
(
Audio::FMixerDevice* InOwner |
Ctor |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Dtor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FQuartzQuantizedCommandHandle | AddCommandToClock
(
FQuartzQuantizedCommandInitInfo& InQuantizationCommandInitInfo |
Add a new command to a given clock safe to call from AudioThread (uses Audio Render Thread command) | |
| bool | CancelCommandOnClock
(
FName InOwningClockName, |
Cancel a queued command on a clock (i.e. cancel a PlayQuantized command if the sound is stopped before it is played) | |
| bool | DoesClockExist
(
const FName& InClockName |
Returns true if a clock with the given name already exists. | |
| void | Flush () |
Shutdown all clocks that don't ignore Flush() (i.e. level change) | |
| FQuartzClockProxy | GetClock
(
const FName& InClockName |
||
| FQuartzTransportTimeStamp | GetCurrentTimestamp
(
const FName& InClockName |
Returns the current location of the clock in the transport. | |
| float | GetDurationOfQuantizationTypeInSeconds
(
const FName& InClockName, |
Returns the duration in seconds of the given Quantization Type, or -1 if the Clock is invalid or nonexistent. | |
| float | GetEstimatedRunTime
(
const FName& InClockName |
Returns the amount of time, in seconds, the clock has been running. Caution: due to latency, this will not be perfectly accurate. | |
| int32 | |||
| FMixerDevice * | Get access to the owning FMixerDevice | ||
| int32 | GetNumClocks () |
||
| FQuartzClockProxy | GetOrCreateClock
(
const FName& InClockName, |
Add (and take ownership of) a new clock safe to call from AudioThread (uses critical section) | |
| FQuartzClockTickRate | GetTickRateForClock
(
const FName& InName |
Get Tick rate for clock safe to call from AudioThread (uses critical section) | |
| bool | HasClockBeenTickedThisUpdate
(
FName InClockName |
||
| bool | IsClockRunning
(
const FName& InClockName |
Returns true if the name is running | |
| 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! | |
| void | PauseClock
(
const FName& InName |
Stop the given clock safe to call from AudioThread (uses Audio Render Thread command) | |
| void | RemoveClock
(
const FName& InName, |
Remove existing clock safe to call from AudioThread (uses Audio Render Thread Command) | |
| void | ResumeClock
(
const FName& InName, |
Start the given clock safe to call from AudioThread (uses Audio Render Thread command) | |
| void | SetTickRateForClock
(
const FQuartzClockTickRate& InNewTickRate, |
||
| void | Shutdown () |
Stop all clocks and cancel all pending events | |
| void | StopClock
(
const FName& InName, |
Stop the given clock safe to call from AudioThread (uses Audio Render Thread command) | |
| void | SubscribeToAllTimeDivisions
(
FName InClockName, |
Subscribe to all time divisions on a clock | |
| void | SubscribeToTimeDivision
(
FName InClockName, |
Subscribe to a specific time division on a clock TODO: update the metronome subscription functions to take an FQuartzGameThreadSubscriber instead of the Command queue ptr (to support metronome event offset) | |
| void | UnsubscribeFromAllTimeDivisions
(
FName InClockName, |
Un-subscribe from all time divisions on a specific clock | |
| void | UnsubscribeFromTimeDivision
(
FName InClockName, |
Un-subscribe from a specific time division on a clock | |
| void | Update
(
int32 NumFramesUntilNextUpdate |
Called on AudioRenderThread. | |
| void | UpdateClock
(
FName InClockToAdvance, |