Get Playback Time

Is there a way to get the playback time of a song more accurately and faster than GetTimelinePosition()?


If you retrieve an event instance’s underlying channel group, you can do a couple of things:

1 Like

Do you have example code?

Sure thing:

// get existing event instance's underlying ChannelGroup
eventInstance.getChannelGroup(out FMOD.ChannelGroup cg;
// get ChannelGroup's DSP clock
cg.getDSPClock(out ulong dspclock, out ulong parentclock);

// iterate over all child Channels of ChannelGroup
cg.getNumChannels(out int numchannels);
for (int i = 0; i < numchannels; i++)
    cg.getChannel(i, out FMOD.Channel channel);
    // get position of current Channel
    channel.getPosition(out uint position, FMOD.TIMEUNIT.MS);