You’re very welcome Kurt. Glad to hear you got it working. I’m not really sure what the best practice is for keeping track of time, but if you want to derive the seconds from a sample count you can make the FilterGraph also inherit from AudioIODeviceCallback and implement audioDeviceIOCallback, audioDeviceAboutToStart and audioDeviceStopped. You have to implement all 3 but you’re only really interested in audioDeviceIOCallback for this. Once you’ve done that then you add the FilterGraph as a callback for the deviceManager. (I’m not sure where it should be done in the demo but look for where the graph player is added as a callback)
Then each time audioDeviceIOCallback is called you just accumulate the number of samples in a member variable on the FilterGraph. Then it’s easy access in getCurrentPosition where you can divide by your current sample rate (you can get that from the deviceManager, not sure if the FilterGraph has a reference to the deviceManager so you may want to add a pointer to it on the class)
to get the seconds. You might find a better or easier way to do it, but this has worked for me.
Or if you don’t really care about sample accuracy or a specific timeline I imagine you could just get the current time using the Time class. But I’m not sure about this or any problems there might be in doing so.