Author Topic: converting file position / length to time val  (Read 3590 times)

mike_r22

  • Posts: 8
can anyone show me how to convert the file stream position
to a seconds please in VB


(: JOBnik! :)

  • Posts: 1080
Re: converting file position / length to  time val
« Reply #1 on: 11 Jun '03 - 14:32 »
Hi ;D

dim sec as single

sec = BASS_ChannelBytes2Seconds(handle, BASS_ChannelGetPosition(handle)
)

* if you want to get the total playing time in seconds of a stream then do this:

dim duration as single

duration = BASS_ChannelBytes2Seconds(handle, BASS_StreamGetLength(handle))

Have fun!

8) JOBnik! 8)

mike_r22

  • Posts: 8
Re: converting file position / length to  time val
« Reply #2 on: 11 Jun '03 - 14:55 »
wow that was quick thanx it works and gives split times
thats very cool
TY jobnik