search for: audiobuf_tim

Displaying 1 result from an estimated 1 matches for "audiobuf_tim".

Did you mean: audiobuf_time
2010 Aug 15
2
Beginner Hurdles
...ideobuf_time=th_granule_time(td,videobuf_granulepos);". Also, there is no documentation that I can find that describes how Vorbis does timing, so I came up with the following code, where I calculate my own timing based on the current byte position in the audio stream: *audioStartTime = audiobuf_time; // return the buffer time from the last call, which was the start of the buffer audiobuf_time = ((double) audiobuf_granulepos)/vi.rate; audiobuf_granulepos += (*numBytes/2)/2; // a granule is a left/right stereo pair, so the [size in bytes divided by 16 bits (2 bytes) divided by stereo (2 c...