GetAudioDuration


ms = GetAudioDuration(channel)

This function returns the duration of an audio file that is currently playing. Channel may be 1 to 10. Up to 10 audio files may be playing concurrently. The duration is returned in milliseconds and may be used with the time formatting functions. This function will return zero when the specified channel has completed playing the audio.


Example:


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

ms = GetAudioDuration(1)
Print "Audio Duration: ";FormatTime(ms, "HH:mm:ss")

Wait





Audio






Become a Patron