getDuration

fun getDuration(): Long

Gets the total duration of the audio file in milliseconds.

Return

The duration in milliseconds if successful (greater than 0); -1 otherwise.