@MaxHayes replied on Discord and here is his answer:
In C++ land, Audio::FQuartzClockProxy::SendCommandToClock()
lets you queue it directly.
The UQuartzClockHandle
is just a wrapper around existing commands you can send.
“RawHandle” is the FQuartzClockProxy.
Note by Matt: you can get the proxy from the transport subsystem: by calling
UQuartzSubsystem::GetProxyForClock()
But: is it correct that your stop doesn’t need to be sample accurate, just musically accurate?
You could do a quick prototype by calling PlayQuantized
w/ a silent sound, and stop the first sound via the command delegate.
FWIW these subscribers are the command queues for the FQuartzTickableObject s. If you wanted to write a custom one, you’d need to check out FQuartzMetronomeDelegateData and FQuartzQuantizedCommandDelegateData (the two existing types of events sent from the AudioRenderThread back to FQuartzTickableObjects).
That comment should say “ProcessCommand()”
Audio component consumption:
UQartzClockHandle consumption:
Lastly, a truly sample-accurate stop would require some changes to AudioMixerSourceManager like done for PlayQuantized
.