how to know how long a track is?

Started by tapeworm22,

tapeworm22

how can i get the information about the length of an mp3? i've tried to use this function:
  BASS_StreamGetLength()
and then:
  BASS_ChannelBytes2Seconds
but always the length i get is not equal "the real" length of a track, it's always longer?
why does it happen? are there any other ways to get the length of a track?

I

#1
Dim X As Long
Dim TotalTimeInSeconds As Long

X = BASS_StreamGetLength(channel)
TotalTimeInSeconds = BASS_ChannelBytes2Seconds(channel, X)


(: JOBnik! :)

Hi ;D

Try using a flag: BASS_MP3_SETPOS
when creating a stream, e.g:

handle = BASS_StreamCreateFile(BASSFALSE,filename,0,0,BASS_MP3_SETPOS)

Have fun!

8) JOBnik! 8)