Hi, I am using version 2.02.23 and my overall goal is to poll the timeline positioning every frame and get an accurate result. I’ve read in forum posts that the internal update rate is 20ms, and could only be changed in advanced settings.
I have followed official documentation to change the settings in pre initialize (with or without encryption), setting the update interval to 10ms instead of 20, and later on I used getAdvancedSettings to verify it’s been set.
However, timeline position readings still come in ~20ms intervals (when I poll per frame at <10ms, duplicate readings are very often). I am using default Unity bank loading settings and none of my assets are streamed, so I don’t know what’s causing this issue.
As noted in the documentation for studioupdateperiod, the update period is still quantized to the nearest multiple of the mixer duration. which is dependent on the sample rate and DSP buffer size. At the default values of 1024 sample buffer and 48kHz samplerate, the mixer updates roughly every 20ms. You may wish to try using System::setDSPBufferSize to make the DSP buffer smaller, and therefore speed up the mixer, though note that this will increase CPU overhead.
Alternatively, you can get an event’s underlying DSP clock and poll that to get sample accurate timing. You can do so by getting an event instance’s underlying channel group with Studio::EventInstance::getChannelGroup, and then get the DSP clock with ChannelControl::getDSPClock.
Otherwise, could I get you to elaborate on why exactly you’re polling the timeline, and what you’re trying to accomplish with this information? I may be able to suggest an easier or more convenient way to go about what you’re doing.