FMOD Engine Core API 2.03, Windows 11, Unity 6000.0.28f1
I was unable to find specifics in the docs, however after creating/releasing several channels which reuse the same SOUND, I find if I attempt to query CHANNEL immediately after creation, it can return large “incorrect” dsp clock values. “incorrect” here being clock values which look stale from reuse, as many seconds worth of samples are reported.
Error checking omitted from examples:
system.playSound(targetSound, targetChannelGroup, paused: true, out Channel channel);
channel.getDSPClock(out ulong channelDspClock, out _);
channelDspClock in this case sometimes will return large values.
As CHANNEL.getDSPClock first parameter is:
“DSP clock value for the tail DSP (FMOD_CHANNELCONTROL_DSP_TAIL) node.”
, I attempt to add a fresh DSP as the tail node.
system.playSound(targetSound, targetChannelGroup, paused: true, out Channel channel);
system.createDSP(ref dspDesc, out DSP dsp);
channel.addDSP(CHANNELCONTROL_DSP_INDEX.TAIL, dsp);
channel.getDSPClock(out ulong channelDspClock, out _);
However, I still can sometimes get large values from channelDspClock.
Is this due to the nature of system.updaterequiring flushing these values? Once I have seen a single FMOD_DSP_READ_CALLBACK fire for any channels DSP the values returned are “corrected”