Vorbisfile documentation |
vorbisfile version 1.2.0 - 20070723 |
declared in "vorbis/vorbisfile.h";
ov_open is one of three initialization functions used to initialize an OggVorbis_File structure and prepare a bitstream for playback.
WARNING for Windows developers: Do not use ov_open() in Windows applications; Windows linking places restrictions on passing FILE * handles successfully, and ov_open() runs afoul of these restrictions [a]. See the ov_open_callbacks() page for details on using ov_open_callbacks() instead.
The first argument must be a file pointer to an already opened file or pipe (it need not be seekable--though this obviously restricts what can be done with the bitstream). vf should be a pointer to the OggVorbis_File structure -- this is used for ALL the externally visible libvorbisfile functions. Once this has been called, the same OggVorbis_File struct should be passed to all the libvorbisfile functions.
The vf structure initialized using ov_fopen() must eventually be cleaned using ov_clear(). Once a FILE * handle is passed to ov_open() successfully, the application MUS>lor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
Vorbisfile documentation |
vorbisfile version 1.2.0 - 20070723 |
declared in "vorbis/vorbisfile.h";
For seekable streams, this seeks to closest full page preceding the given time. This function is faster than ov_time_seek because it doesn't seek through the last few samples to reach an exact time, but it is also less accurate. This should be used when speed is important.
This function also updates everything needed within the decoder, so you can immediately call ov_read() and get data from the newly seeked to position.
This function does not work for unseekable streams.
int ov_time_seek_page(OggVorbis_File *vf, double s); |
- 0 for success
- nonzero indicates failure, described by several error codes:
- OV_ENOSEEK - Bitstream is not seekable.
- OV_EINVAL - Invalid argument value; possibly called with an OggVorbis_File structure that isn't open.
- OV_EREAD - A read from media returned an error.
- OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
- OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt.
copyright © 2007 Xiph.org |
|
Vorbisfile documentation |
vorbisfile version 1.2.0 - 20070723 |