Vorbisfile - Seeking

Vorbisfile documentation | libVorbisfile version 1.65 - 20020702

# Seeking

Seeking functions allow you to specify a specific point in the stream to begin or continue decoding.

All libvorbisfile seeking routines are declared in "vorbis/vorbisfile.h".

Certain seeking functions are best suited to different situations. When speed is important and exact positioning isn't required, page-level seeking should be used. Note also that Vorbis files do not necessarily start at a sample number or time offset of zero. Do not be surprised if a file begins at a positive offset of several minutes or hours, such as would happen if a large stream (such as a concert recording) is chopped into multiple separate files. Requesting to seek to a position before the beginning of such a file will seek to the position where audio begins.

function | purpose
ov_raw_seek | This function seeks to a position specified in the compressed bitstream, specified in bytes.
ov_pcm_seek | This function seeks to a specific audio sample number, specified in pcm samples.
ov_pcm_seek_page | This function seeks to the closest page preceding the specified audio sample number, specified in pcm samples.
ov_time_seek | This function seeks to the specific time location in the bitstream, specified in seconds
ov_time_seek_page | This function seeks to the closest page preceding the specified time position in the bitstream

copyright © 2002 Xiph.org | Ogg Vorbis
Vorbisfile documentation | libVorbisfile version 1.65 - 20020702