Determine total sound playing length (ms)

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

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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