Vorbisfile documentation |
vorbisfile version 1.3.2 - 20101101 |
declared in "vorbis/vorbisfile.h";
This is the simplest function used to open and initialize an OggVorbis_File structure. It sets up all the related decoding structure.
The first argument is a file path suitable for passing to fopen(). vf should be a pointer to an empty 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().
It is often useful to call ov_fopen() simply to determine whether a given file is a Vorbis bitstream. If the ov_fopen() call fails, then the file is either inaccessable (errno is set) or not recognizable as Vorbis (errno unchanged). If the call succeeds but the initialized vf structure will not be used, the application is responsible for calling ov_clear() to clear the decoder's buffers and close the file.
int ov_fopen(const char *path,OggVorbis_File *vf); |
0 indicates success less than zero for failure:
- OV_EREAD - A read from media returned an error.
- OV_ENOTVORBIS - Bitstream does not contain any Vorbis data.
- OV_EVERSION - Vorbis version mismatch.
- OV_EBADHEADER - Invalid Vorbis bitstream header.
- OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
copyright © 2000-2010 Xiph.Org |
|
Vorbisfile documentation |
vorbisfile version 1.3.2 - 20101101 |