UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
QuartzQuantizationUtilities.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
8#include "UObject/Object.h"
9#include "UObject/Class.h"
10#include "Containers/Map.h"
11#include "Containers/Queue.h"
13
14#include "QuartzQuantizationUtilities.generated.h"
15
18
19// forwards
20struct FQuartzClockTickRate;
23
24
25
26namespace Audio
27{
28 // forwards (Audio::)
30 class IQuartzQuantizedCommand;
31 class FQuartzClock;
33
34 class FMixerDevice;
35
36 struct FQuartzQuantizedCommandDelegateData;
37 struct FQuartzMetronomeDelegateData;
38 struct FQuartzQueueCommandData;
39 struct FQuartzQuantizedCommandInitInfo;
40} // namespace Audio
41
42
43// An enumeration for specifying quantization for Quartz commands
44UENUM(BlueprintType)
46{
47 Bar UMETA(DisplayName = "Bar", ToolTip = "(dependent on time signature)"),
48 Beat UMETA(DisplayName = "Beat", ToolTip = "(dependent on time signature and Pulse Override)"),
49
50 ThirtySecondNote UMETA(DisplayName = "1/32"),
51 SixteenthNote UMETA(DisplayName = "1/16"),
52 EighthNote UMETA(DisplayName = "1/8"),
53 QuarterNote UMETA(DisplayName = "1/4"),
54 HalfNote UMETA(DisplayName = "Half"),
55 WholeNote UMETA(DisplayName = "Whole"),
56
57 DottedSixteenthNote UMETA(DisplayName = "(dotted) 1/16"),
58 DottedEighthNote UMETA(DisplayName = "(dotted) 1/8"),
59 DottedQuarterNote UMETA(DisplayName = "(dotted) 1/4"),
60 DottedHalfNote UMETA(DisplayName = "(dotted) Half"),
61 DottedWholeNote UMETA(DisplayName = "(dotted) Whole"),
62
63 SixteenthNoteTriplet UMETA(DisplayName = "1/16 (triplet)"),
64 EighthNoteTriplet UMETA(DisplayName = "1/8 (triplet)"),
65 QuarterNoteTriplet UMETA(DisplayName = "1/4 (triplet)"),
66 HalfNoteTriplet UMETA(DisplayName = "1/2 (triplet)"),
67
68 Tick UMETA(DisplayName = "On Tick (Smallest Value, same as 1/32)", ToolTip = "(same as 1/32)"),
69
71
72 None UMETA(DisplayName = "None", ToolTip = "(Execute as soon as possible)"),
73 // (when using "Count" in various logic, we don't want to account for "None")
74};
75
76// An enumeration for specifying the denominator of time signatures
77UENUM(BlueprintType)
79{
80 HalfNote UMETA(DisplayName = "/2"),
81 QuarterNote UMETA(DisplayName = "/4"),
82 EighthNote UMETA(DisplayName = "/8"),
83 SixteenthNote UMETA(DisplayName = "/16"),
84 ThirtySecondNote UMETA(DisplayName = "/32"),
85
87};
88
90
91// Allows the user to specify non-uniform beat durations in odd meters
92USTRUCT(BlueprintType)
94{
96
97 // The number of pulses for this beat duration
98 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quantized Audio Clock Time Signature")
99 int32 NumberOfPulses{ 1 };
100
101 // This Beat duration
102 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quantized Audio Clock Time Signature")
103 EQuartzCommandQuantization PulseDuration{ EQuartzCommandQuantization::Beat };
104};
105
106
107// Quartz Time Signature
108USTRUCT(BlueprintType)
110{
112
113 // default ctor
115
116 // numerator
117 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quantized Audio Clock Time Signature", meta = (ClampMin = "1", UIMin = "1"))
118 int32 NumBeats { 4 };
119
120 // denominator
121 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quantized Audio Clock Time Signature")
122 EQuartzTimeSignatureQuantization BeatType { EQuartzTimeSignatureQuantization::QuarterNote };
123
124 // beat override
125 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quantized Audio Clock Time Signature")
126 TArray<FQuartzPulseOverrideStep> OptionalPulseOverride { };
127
128
129 // copy ctor
131
132 // assignment
134
135 // comparison
136 ENGINE_API bool operator==(const FQuartzTimeSignature& Other) const;
137};
138
139// Transport Time stamp, used for tracking the musical time stamp on a clock
140USTRUCT(BlueprintType)
142{
144
145 // The current bar this clock is on
146 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Quantized Audio TimeStamp")
147 int32 Bars { 0 };
148
149 // The current beat this clock is on
150 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Quantized Audio TimeStamp")
151 int32 Beat{ 0 };
152
153 // A fractional representation of the time that's played since the last bear
154 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Quantized Audio TimeStamp")
155 float BeatFraction{ 0.f };
156
157 // The time in seconds that this TimeStamp occured at
158 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Quantized Audio TimeStamp")
160
161 ENGINE_API bool IsZero() const;
162
163 ENGINE_API void Reset();
164};
165
166
167// An enumeration for specifying different TYPES of delegates
168UENUM(BlueprintType)
170{
171 MetronomeTick UMETA(DisplayName = "Metronome Tick"), // uses EAudioMixerCommandQuantization to select subdivision
172 CommandEvent UMETA(DisplayName = "Command Event"),
173
175};
176
177
178// An enumeration for specifying quantization boundary reference frame
179UENUM(BlueprintType, meta = (DisplayName="EQuartz Quantization Reference")) // display name to hide c++ typo for now
181{
182 BarRelative UMETA(DisplayName = "Bar Relative", ToolTip = "Will occur on the next occurence of this duration from the start of a bar (i.e. On beat 3)"),
183 TransportRelative UMETA(DisplayName = "Transport Relative", ToolTip = "Will occur on the next multiple of this duration since the clock started ticking (i.e. on the next 4 bar boundary)"),
184 CurrentTimeRelative UMETA(DisplayName = "Current Time Relative", ToolTip = "Will occur on the next multiple of this duration from the current time (i.e. In three beats)"),
185
187};
188
189// An enumeration for specifying different TYPES of delegates
190UENUM(BlueprintType)
192{
193 CommandOnFailedToQueue UMETA(DisplayName = "Failed To Queue", ToolTip = "The command will not execute (i.e. Clock doesn't exist or PlayQuantized failed concurrency)"),
194 CommandOnQueued UMETA(DisplayName = "Queued", ToolTip = "The command has been passed to the Audio Render Thread"),
195 CommandOnCanceled UMETA(DisplayName = "Canceled", ToolTip = "The command was stopped before it could execute"),
196 CommandOnAboutToStart UMETA(DisplayName = "About To Start", ToolTip = "execute off this to be in sync w/ sound starting"),
197 CommandOnStarted UMETA(DisplayName = "Started", ToolTip = "the command was just executed on the Audio Render Thrtead"),
198
200};
201
202// An enumeration for specifying Quartz command types
203UENUM(BlueprintType)
205{
206 PlaySound UMETA(DisplayName = "Play Sound", ToolTip = "Play a sound on a spample-accurate boundary (taking a voice slot immediately)"),
207 QueueSoundToPlay UMETA(DisplayName = "Queue Sound To Play", ToolTip = "Queue a sound to play when it gets closer to its quantization boundary (avoids stealing a voice slot right away)"),
208 RetriggerSound UMETA(DisplayName = "Re-trigger Sound", ToolTip = "Quantized looping of the target sound (event tells the AudioComponent to play the sound again)"),
209 TickRateChange UMETA(DisplayName = "Tick Rate Change", ToolTip = "Quantized change of the tick-rate (i.e. BPM change)"),
210 TransportReset UMETA(DisplayName = "Transport Reset", ToolTip = "Quantized reset of the clocks transport (back to time = 0 on the boundary)"),
211 StartOtherClock UMETA(DisplayName = "Start Other Clock", ToolTip = "Quantized start of another clock. Useful for sample accurate synchronization of clocks (i.e. to handle time signature changes)"),
212 Notify UMETA(DisplayName = "Quantized Notify", ToolTip = "Command used only to get delegates for timing information (basically an empty command)"),
213 Custom UMETA(DisplayName = "Custom", ToolTip = "Quantized custom command")
214}; // EQuartzCommandType
215
216
217// Delegate Declarations
220
223
224// UStruct version of settings struct used to initialized a clock
225USTRUCT(BlueprintType)
227{
229
230 // Time Signature (defaults to 4/4)
231 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quantized Audio Clock Settings")
232 FQuartzTimeSignature TimeSignature;
233
234 // should the clock start Ticking
235 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quantized Audio Clock Settings")
236 bool bIgnoreLevelChange{ false };
237
238}; // struct FQuartzClockSettings
239
240// ---------
241
242// Class to track latency trends
243// will lazily calculate running average on the correct thread
245{
246public:
248
249 ENGINE_API void PushLatencyTrackerResult(const double& InResult);
250
252
254
256
257private:
258 void PushSingleResult(const double& InResult);
259
260 void DigestQueue();
261
263
264 int64 NumEntries{ 0 };
265
266 float LifetimeAverage{ 0.f };
267
268 float Min{ 0.0f };
269
270 float Max{ 0.0f };
271};
272
273// NON-UOBJECT LAYER:
274namespace Audio
275{
276 class FAudioMixer;
277
278 // Utility class to set/get/convert tick rate
279 // In this context "Tick Rate" refers to the duration of smallest temporal resolution we may care about
280 // in musical time, this is locked to a 1/32nd note
281
282 struct FQuartzClockTickRate
283 {
284
285 public:
286 // ctor
287 ENGINE_API FQuartzClockTickRate();
288
289 // Setters
290 ENGINE_API void SetFramesPerTick(int32 InNewFramesPerTick);
291
292 ENGINE_API void SetMillisecondsPerTick(double InNewMillisecondsPerTick);
293
294 ENGINE_API void SetSecondsPerTick(double InNewSecondsPerTick);
295
296 ENGINE_API void SetThirtySecondNotesPerMinute(double InNewThirtySecondNotesPerMinute);
297
298 ENGINE_API void SetBeatsPerMinute(double InNewBeatsPerMinute);
299
300 ENGINE_API void SetSampleRate(double InNewSampleRate);
301
302 // Getters
303 double GetFramesPerTick() const { return FramesPerTick; }
304
305 double GetMillisecondsPerTick() const { return MillisecondsPerTick; }
306
307 double GetSecondsPerTick() const { return SecondsPerTick; }
308
309 double GetThirtySecondNotesPerMinute() const { return ThirtySecondNotesPerMinute; }
310
311 double GetBeatsPerMinute() const { return BeatsPerMinute; }
312
313 double GetSampleRate() const { return SampleRate; }
314
315 ENGINE_API double GetFramesPerDuration(EQuartzCommandQuantization InDuration) const;
316
317 ENGINE_API double GetFramesPerDuration(EQuartzTimeSignatureQuantization InDuration) const;
318
320
321 ENGINE_API bool IsSameTickRate(const FQuartzClockTickRate& Other, bool bAccountForDifferentSampleRates = true) const;
322
323
324
325 private:
326 // FramesPerTick is our ground truth
327 // update FramesPerTick and call RecalculateDurationsBasedOnFramesPerTick() to update other members
328 double FramesPerTick{ 1.0 };
329 double MillisecondsPerTick{ 1.0 };
330 double SecondsPerTick{ 1.0 };
331 double ThirtySecondNotesPerMinute{ 1.0 };
332 double BeatsPerMinute{ 0.0 };
333 double SampleRate{ 44100.0 };
334
335 ENGINE_API void RecalculateDurationsBasedOnFramesPerTick();
336
337 }; // class FAudioMixerClockTickRate
338
339 // Simple class to track latency as a request/action propagates from GT to ART (or vice versa)
340 class FQuartzLatencyTimer
341 {
342 public:
343 // ctor
344 ENGINE_API FQuartzLatencyTimer();
345
346 // record the start time
347 ENGINE_API void StartTimer();
348
349 // reset the start time
350 ENGINE_API void ResetTimer();
351
352 // stop the timer
353 ENGINE_API void StopTimer();
354
355 // get the current value of a running timer
356 ENGINE_API double GetCurrentTimePassedMs();
357
358 // get the final time of a stopped timer
359 ENGINE_API double GetResultsMilliseconds();
360
361 // returns true if the Timer was started (could be running or stopped)
362 ENGINE_API bool HasTimerStarted();
363
364 // returns true if the timer has been run and stopped
365 ENGINE_API bool HasTimerStopped();
366
367 // returns true if the timer is running
368 ENGINE_API bool IsTimerRunning();
369
370 // returns true if the timer has completed (we can get the results)
371 ENGINE_API bool HasTimerRun();
372
373 private:
374 int64 JourneyStartCycles;
375
376 int64 JourneyEndCycles;
377 };
378
379 // class to track time a QuartzMessage takes to get from one thread to another
380 class FQuartzCrossThreadMessage : public FQuartzLatencyTimer
381 {
382 public:
383 ENGINE_API FQuartzCrossThreadMessage(bool bAutoStartTimer = true);
384
385 ENGINE_API void RequestSent();
386
387 ENGINE_API double RequestReceived() const;
388
389 ENGINE_API double GetResultsMilliseconds() const;
390
391 ENGINE_API double GetCurrentTimeMilliseconds() const;
392
393 private:
394 mutable FQuartzLatencyTimer Timer;
395 };
396
397 struct FQuartzOffset
398 {
399 public:
400 // ctor
401 ENGINE_API FQuartzOffset(double InOffsetInMilliseconds = 0.0);
403
404 // offset get/set
405 ENGINE_API void SetOffsetInMilliseconds(double InMilliseconds);
406
407 ENGINE_API void SetOffsetMusical(EQuartzCommandQuantization Duration, double Multiplier);
408
409 bool IsSet() const { return IsSetAsMilliseconds() || IsSetAsMusicalDuration(); }
410
411 ENGINE_API bool IsSetAsMilliseconds() const;
412
413 ENGINE_API bool IsSetAsMusicalDuration() const;
414
415 ENGINE_API int32 GetOffsetInAudioFrames(const FQuartzClockTickRate& InTickRate);
416
417 ENGINE_API bool operator==(const FQuartzOffset& Other) const;
418
419 private:
420 // only one of these optionals will be valid at a time
421 // (depending on which setter is called)
422 TOptional<double> OffsetInMilliseconds;
424
425 };
426
427 namespace Quartz
428 {
429 class IQueueCommandListener;
430 class ICommandListener;
431 class IMetronomeEventListener;
432
434 using FQuartzGameThreadCommandQueuePtr = TSharedPtr<FQuartzSubscriberCommandQueue, ESPMode::ThreadSafe>;
435 } // namespace Quartz
436
437 struct FQuartzGameThreadSubscriber
438 {
439 FQuartzGameThreadSubscriber() = default;
440
441 // this is only for back-compat until metronomes support FQuartzGameThreadSubscribers instead of raw queue ptrs
442 // (for Metronome event offsets)
443 FQuartzGameThreadSubscriber(const Quartz::FQuartzGameThreadCommandQueuePtr& InQueuePtr)
444 : Queue(InQueuePtr)
445 { }
446
447
448 // copy ctor
449 FQuartzGameThreadSubscriber(const Quartz::FQuartzGameThreadCommandQueuePtr& InQueuePtr, FQuartzOffset InOffset)
450 : Offset(InOffset)
451 , Queue(InQueuePtr)
452 { }
453
454 // change offset
455 void SetOffset(FQuartzOffset InOffset) { Offset = MoveTemp(InOffset); }
456
457 bool HasBeenNotifiedOfAboutToStart() const { return bHasBeenNotifiedOfAboutToStart; }
458
459 // comparison
460 ENGINE_API bool operator==(const FQuartzGameThreadSubscriber& Other) const;
461
462 // notify
463 ENGINE_API void PushEvent(const FQuartzQuantizedCommandDelegateData& Data);
464 ENGINE_API void PushEvent(const FQuartzMetronomeDelegateData& Data);
465 ENGINE_API void PushEvent(const FQuartzQueueCommandData& Data);
466
467 // allow implicit casting to the underlying queue
468 operator Quartz::FQuartzGameThreadCommandQueuePtr() const { return Queue; }
469
470 // positive: anticipatory amount, negative:
471 ENGINE_API int32 FinalizeOffset(const FQuartzClockTickRate& TickRate);
472 ENGINE_API int32 GetOffsetAsAudioFrames() const;
473
474
475
476 private:
477 FQuartzOffset Offset;
478 Quartz::FQuartzGameThreadCommandQueuePtr Queue;
479 bool bOffsetConvertedToFrames = false;
480 bool bHasBeenNotifiedOfAboutToStart = false;
481 int32 OffsetInAudioFrames = 0;
482 };
483} // namespace Audio
484
485
486// struct used to specify the quantization boundary of an event
487USTRUCT(BlueprintType)
489{
491
492 // resolution we are interested in
493 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quantized Audio Clock Settings")
494 EQuartzCommandQuantization Quantization{ EQuartzCommandQuantization::None };
495
496 // how many "Resolutions" to wait before the onset we care about
497 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quantized Audio Clock Settings", meta = (ClampMin = "1.0"))
499
500 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quantized Audio Clock Settings")
501 EQuarztQuantizationReference CountingReferencePoint{ EQuarztQuantizationReference::BarRelative };
502
503 // If this is true and the Clock hasn't started yet, the event will fire immediately when the Clock starts
504 UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Quantized Audio Clock Settings")
505 bool bFireOnClockStart{ true };
506
507 // If this is true, this command will be canceled if the Clock is stopped or otherwise not running
508 UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Quantized Audio Clock Settings")
509 bool bCancelCommandIfClockIsNotRunning{ false };
510
511 // If this is true, queueing the sound will also call a Reset Clock command
512 UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Quantized Audio Clock Settings")
513 bool bResetClockOnQueued{ false };
514
515 // If this is true, queueing the sound will also call a Resume Clock command
516 UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Quantized Audio Clock Settings")
517 bool bResumeClockOnQueued{ false };
518
519 // Game thread subscribers that will be passed to command init data (for C++ implementations)
521
522 // ctor
524 EQuartzCommandQuantization InQuantization = EQuartzCommandQuantization::None,
525 float InMultiplier = 1.0f,
526 EQuarztQuantizationReference InReferencePoint = EQuarztQuantizationReference::BarRelative,
527 bool bInFireOnClockStart = true)
528 : Quantization(InQuantization)
530 , CountingReferencePoint(InReferencePoint)
531 , bFireOnClockStart(bInFireOnClockStart)
532 {}
533
534 ENGINE_API FString ToString() const;
535}; // struct FQuartzQuantizationBoundary
536
537
538namespace Audio
539{
540 // data that is gathered by the AudioThread to get passed from FActiveSound->FMixerSourceVoice
541 // eventually converted to IQuartzQuantizedCommand for the Quantized Command itself
543 {
544 // shared with FQuartzQuantizedCommandInitInfo:
548 FQuartzQuantizationBoundary QuantizationBoundary{ EQuartzCommandQuantization::Tick, 1.f, EQuarztQuantizationReference::BarRelative, true };
551 };
552
553
554 // data that is passed into IQuartzQuantizedCommand::OnQueued
555 // info that derived classes need can be added here
585
586 // base class for quantized commands. Virtual methods called by owning clock.
587 class IQuartzQuantizedCommand : public FQuartzCrossThreadMessage
588 {
589 public:
590
591 // ctor
593
594 // dtor
596
597 // allocate a copy of the derived class
599
600 ENGINE_API void AddSubscriber(FQuartzGameThreadSubscriber InSubscriber);
601
602 // Command has reached the AudioRenderThread
604
605 // scheduled (finalize subscriber offsets) - called by FQuartzClock
606 ENGINE_API void OnScheduled(const FQuartzClockTickRate& InTickRate);
607
608 // called during FQuartzClock::Tick() to let us call AboutToStart
609 // at different times for different subscribers
611
612 // Perhaps the associated sound failed concurrency and will not be playing
614
615 // Called 2x Assumed thread latency before OnFinalCallback()
617
618 // Called on the final callback of this event boundary.
619 // InNumFramesLeft is the number of frames into the callback the exact quantized event should take place
621
622 // Called if the owning clock gets stopped
624
625 // Called if the owning clock gets started
627
628 // Called if the event is cancelled before OnFinalCallback() is called
629 ENGINE_API void Cancel();
630
631
632 //Called if the event type uses an altered amount of frames
633 virtual int32 OverrideFramesUntilExec(int32 NumFramesUntilExec) { return NumFramesUntilExec; }
634
635
636 virtual bool IsClockAltering() { return false; }
637 virtual bool ShouldDeadlineIgnoresBpmChanges() { return false; }
638 virtual bool RequiresAudioDevice() const { return false; }
639
640 virtual FName GetCommandName() const = 0;
642
643
644 private:
645 // derived classes can override these to add extra functionality
646 virtual void OnQueuedCustom(const FQuartzQuantizedCommandInitInfo& InCommandInitInfo) {}
647 virtual void FailedToQueueCustom() {}
648 virtual void AboutToStartCustom() {}
649 virtual void OnFinalCallbackCustom(int32 InNumFramesLeft) {}
650 virtual void OnClockPausedCustom() {}
651 virtual void OnClockStartedCustom() {}
652 virtual void CancelCustom() {}
653
654 TArray<FQuartzGameThreadSubscriber> GameThreadSubscribers;
655
656 int32 GameThreadDelegateID{ -1 };
657 }; // class IAudioMixerQuantizedCommandBase
658
659 // Audio Render Thread Handle to a queued command
660 // Used by AudioMixerSourceVoices to access a pending associated command
662 {
666
667 // Attempts to cancel the command. Returns true if the cancellation was successful.
668 ENGINE_API bool Cancel();
669
670 // Resets the handle to initial state.
671 ENGINE_API void Reset();
672 };
673} // namespace Audio
674
#define ensure( InExpression)
Definition AssertionMacros.h:464
@ INDEX_NONE
Definition CoreMiscDefines.h:150
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(DelegateName, Param1Type, Param1Name, Param2Type, Param2Name)
Definition DelegateCombinations.h:62
#define DECLARE_DYNAMIC_MULTICAST_DELEGATE_FiveParams(DelegateName, Param1Type, Param1Name, Param2Type, Param2Name, Param3Type, Param3Name, Param4Type, Param4Name, Param5Type, Param5Name)
Definition DelegateCombinations.h:89
#define DECLARE_DYNAMIC_DELEGATE_FiveParams(DelegateName, Param1Type, Param1Name, Param2Type, Param2Name, Param3Type, Param3Name, Param4Type, Param4Name, Param5Type, Param5Name)
Definition DelegateCombinations.h:88
#define DECLARE_DYNAMIC_DELEGATE_TwoParams(DelegateName, Param1Type, Param1Name, Param2Type, Param2Name)
Definition DelegateCombinations.h:61
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
EQuarztQuantizationReference
Definition QuartzQuantizationUtilities.h:181
EQuartzCommandType
Definition QuartzQuantizationUtilities.h:205
EQuartzCommandQuantization
Definition QuartzQuantizationUtilities.h:46
EQuartzCommandQuantization ENGINE_API TimeSignatureQuantizationToCommandQuantization(const EQuartzTimeSignatureQuantization &BeatType)
Definition QuartzQuantizationUtilities.cpp:14
EQuartzDelegateType
Definition QuartzQuantizationUtilities.h:170
EQuartzCommandDelegateSubType
Definition QuartzQuantizationUtilities.h:192
EQuartzTimeSignatureQuantization
Definition QuartzQuantizationUtilities.h:79
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
@ Multiplier
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition AudioMixerDevice.h:117
Definition QuartzQuantizationUtilities.h:588
virtual bool RequiresAudioDevice() const
Definition QuartzQuantizationUtilities.h:638
ENGINE_API void OnScheduled(const FQuartzClockTickRate &InTickRate)
Definition QuartzQuantizationUtilities.cpp:519
virtual bool ShouldDeadlineIgnoresBpmChanges()
Definition QuartzQuantizationUtilities.h:637
ENGINE_API void AboutToStart()
Definition QuartzQuantizationUtilities.cpp:572
virtual ENGINE_API ~IQuartzQuantizedCommand()
ENGINE_API void AddSubscriber(FQuartzGameThreadSubscriber InSubscriber)
Definition QuartzQuantizationUtilities.cpp:484
virtual bool IsClockAltering()
Definition QuartzQuantizationUtilities.h:636
virtual int32 OverrideFramesUntilExec(int32 NumFramesUntilExec)
Definition QuartzQuantizationUtilities.h:633
ENGINE_API void OnFinalCallback(int32 InNumFramesLeft)
Definition QuartzQuantizationUtilities.cpp:594
ENGINE_API void FailedToQueue(FQuartzQuantizedRequestData &InGameThreadData)
Definition QuartzQuantizationUtilities.cpp:548
virtual EQuartzCommandType GetCommandType() const =0
ENGINE_API void Cancel()
Definition QuartzQuantizationUtilities.cpp:629
ENGINE_API void OnQueued(const FQuartzQuantizedCommandInitInfo &InCommandInitInfo)
Definition QuartzQuantizationUtilities.cpp:489
ENGINE_API void OnClockPaused()
Definition QuartzQuantizationUtilities.cpp:615
virtual FName GetCommandName() const =0
ENGINE_API void OnClockStarted()
Definition QuartzQuantizationUtilities.cpp:622
virtual ENGINE_API TSharedPtr< IQuartzQuantizedCommand > GetDeepCopyOfDerivedObject() const
Definition QuartzQuantizationUtilities.cpp:477
Definition QuartzCommandQueue.h:16
Definition NameTypes.h:617
Definition QuartzQuantizationUtilities.h:245
ENGINE_API float GetLifetimeAverageLatency()
Definition QuartzQuantizationUtilities.cpp:100
ENGINE_API void PushLatencyTrackerResult(const double &InResult)
Definition QuartzQuantizationUtilities.cpp:88
ENGINE_API FQuartLatencyTracker()
Definition QuartzQuantizationUtilities.cpp:82
ENGINE_API float GetMaxLatency()
Definition QuartzQuantizationUtilities.cpp:120
ENGINE_API float GetMinLatency()
Definition QuartzQuantizationUtilities.cpp:110
Definition QuartzSubscription.h:49
Definition Array.h:670
Definition Queue.h:48
Definition SharedPointer.h:692
NO_LOGGING.
Definition AudioMixerPlatformAndroid.cpp:53
const FVector Offset(0, 0, 20)
bool operator==(const FCachedAssetKey &A, const FCachedAssetKey &B)
Definition AssetDataMap.h:501
VERSECOMPILER_API bool IsSet()
Definition CommandLine.cpp:63
Definition QuartzQuantizationUtilities.h:662
TSharedPtr< IQuartzQuantizedCommand > CommandPtr
Definition QuartzQuantizationUtilities.h:664
ENGINE_API bool Cancel()
Definition QuartzQuantizationUtilities.cpp:648
ENGINE_API void Reset()
Definition QuartzQuantizationUtilities.cpp:662
FMixerDevice * MixerDevice
Definition QuartzQuantizationUtilities.h:665
FName OwningClockName
Definition QuartzQuantizationUtilities.h:663
Definition QuartzQuantizationUtilities.h:557
TArray< FQuartzGameThreadSubscriber > GameThreadSubscribers
Definition QuartzQuantizationUtilities.h:574
FQuartzQuantizationBoundary QuantizationBoundary
Definition QuartzQuantizationUtilities.h:573
TSharedPtr< IQuartzQuantizedCommand > QuantizedCommandPtr
Definition QuartzQuantizationUtilities.h:572
FName OtherClockName
Definition QuartzQuantizationUtilities.h:571
float SampleRate
Definition QuartzQuantizationUtilities.h:579
int32 SourceID
Definition QuartzQuantizationUtilities.h:580
FName ClockName
Definition QuartzQuantizationUtilities.h:570
int32 GameThreadDelegateID
Definition QuartzQuantizationUtilities.h:575
TSharedPtr< Audio::FQuartzClock > OwningClockPointer
Definition QuartzQuantizationUtilities.h:578
int32 FrameOverrideAmount
Definition QuartzQuantizationUtilities.h:583
void SetOwningClockPtr(TSharedPtr< Audio::FQuartzClock > InClockPointer)
Definition QuartzQuantizationUtilities.h:563
Definition QuartzQuantizationUtilities.h:543
FName ClockName
Definition QuartzQuantizationUtilities.h:545
TArray< FQuartzGameThreadSubscriber > GameThreadSubscribers
Definition QuartzQuantizationUtilities.h:549
FName OtherClockName
Definition QuartzQuantizationUtilities.h:546
TSharedPtr< IQuartzQuantizedCommand > QuantizedCommandPtr
Definition QuartzQuantizationUtilities.h:547
FQuartzQuantizationBoundary QuantizationBoundary
Definition QuartzQuantizationUtilities.h:548
int32 GameThreadDelegateID
Definition QuartzQuantizationUtilities.h:550
Definition QuartzQuantizationUtilities.h:676
FAudioComponentCommandInfo()
Definition QuartzQuantizationUtilities.h:677
Audio::FQuartzGameThreadSubscriber Subscriber
Definition QuartzQuantizationUtilities.h:687
FQuartzQuantizationBoundary AnticipatoryBoundary
Definition QuartzQuantizationUtilities.h:688
FAudioComponentCommandInfo(Audio::FQuartzGameThreadSubscriber InSubscriber, FQuartzQuantizationBoundary InAnticaptoryBoundary)
Definition QuartzQuantizationUtilities.h:679
uint32 CommandID
Definition QuartzQuantizationUtilities.h:689
Definition QuartzQuantizationUtilities.h:227
Definition QuartzQuantizationUtilities.h:94
Definition QuartzQuantizationUtilities.h:489
TArray< Audio::FQuartzGameThreadSubscriber > GameThreadSubscribers
Definition QuartzQuantizationUtilities.h:520
FQuartzQuantizationBoundary(EQuartzCommandQuantization InQuantization=EQuartzCommandQuantization::None, float InMultiplier=1.0f, EQuarztQuantizationReference InReferencePoint=EQuarztQuantizationReference::BarRelative, bool bInFireOnClockStart=true)
Definition QuartzQuantizationUtilities.h:523
Definition QuartzQuantizationUtilities.h:110
Definition QuartzQuantizationUtilities.h:142
Definition Optional.h:131