I've managed to work out that you can measure your position in a looping audio tack by using modulo. The formula is Audio.PlaybackTime % Audio.Duration.
This works well at a normal playback rate. But I need to reduce tempo of the audio track over time (by changing the playback rate). And unfortunately, as I change the playback rate, it seems to throw the calculation off.
Can any of the maths geniuses out there, provide any ideas on how I can incorporate a changing playback rate into the formula. My rate goes down by a set amount every second until it reaches the desired goal.
Thanks for any advice you can offer