HydrogenAudio

Lossy Audio Compression => Ogg Vorbis => Ogg Vorbis - General => Topic started by: mindbreaker on 2011-03-31 16:58:58

Title: Get x seconds
Post by: mindbreaker on 2011-03-31 16:58:58
hi,

I'm currently wrting a small app (C++) and I want to load a vorbis file.
everything works but now I want to have x amount of seconds read in stade of x amount of data.
it's probably a single simple line (using the bitrate ?) to convert the time wanted to data wanted but I can't figure it out...
any help ?

cheers
Title: Get x seconds
Post by: Garf on 2011-03-31 17:55:57
Vorbis bitrate is variable, so you cannot use it to convert time to size. You need to parse at least the Ogg layer and interpret the timestamps.