Determine total sound playing length (ms)

BlitzMax Forums/BlitzMax Beginners Area/Determine total sound playing length (ms)

cool :)

*EDIT*
just for the hell of it, I converted it to a function:
SuperStrict

Local sample:TAudioSample = LoadAudioSample("battle.ogg")
Local length:Float = getSampleLength(sample)
Print "Length in seconds: " + length
Print "Length: " + Int(Floor(length/60))+"m "+Int(length Mod 60)+"s"

Function getSampleLength:Float(sample:TAudioSample)
	Return Float( (sample.length / Float( (sample.hertz * 60) ) ) * 60)
End Function