GetAudioPosition


ms = GetAudioPosition(channel)

This function returns the position of an audio file that is currently playing. Channel may be 1 to 10. Up to 10 audio files may be playing concurrently. The position is returned in milliseconds and may be used with the time formatting functions.


Example:


' Play an audio file.
PlayAudio 1, "audio/myaudio.mp3"

TimeLoop:

ms = GetAudioPosition(1)
Print "Audio Position: ";FormatTime(ms, "HH:mm:ss")

Wait 250
If GetAudioDuration(1) > 0 Then TimeLoop

Print "End of Track"

Wait





Audio






Become a Patron