Author Topic: How get Duration of Ogg File  (Read 312 times)

EWeiss

  • Posts: 365
How get Duration of Ogg File
« on: 18 Apr '18 - 13:54 »
Hello,

I want get Duration of a ogg File without Play the File first. !VB6!
it's possible. ?

this is necessary in order to play the file.

greets

Ian @ un4seen

  • Administrator
  • Posts: 21188
Re: How get Duration of Ogg File
« Reply #1 on: 18 Apr '18 - 17:30 »
You can get the duration in bytes from BASS_ChannelGetLength (and use BASS_ChannelBytes2Seconds to convert it to seconds) without playing the file. If you won't be playing the file at all, you can save some time and resources by using the BASS_STREAM_DECODE flag in the BASS_StreamCreateFile call.

EWeiss

  • Posts: 365
Re: How get Duration of Ogg File
« Reply #2 on: 19 Apr '18 - 12:21 »
You can get the duration in bytes from BASS_ChannelGetLength (and use BASS_ChannelBytes2Seconds to convert it to seconds) without playing the file. If you won't be playing the file at all, you can save some time and resources by using the BASS_STREAM_DECODE flag in the BASS_StreamCreateFile call.

Thank you i want test it.

greets