Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Get x seconds (Read 3873 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Get x seconds

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

Get x seconds

Reply #1
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.