Vorbisfile documentation |
vorbisfile version 1.3.2 - 20101101 |
declared in "vorbis/vorbisfile.h";
This is an alternative function used to open and test an OggVorbis_File structure when using a data source other than a file, when its necessary to modify default file access behavior, or to test for Vorbis content from a FILE * pointer under Windows where ov_test() cannot be used. It allows the application to specify custom file manipulation routines and sets up all the related decoding structures.
Once this has been called, the same OggVorbis_File struct should be passed to all the libvorbisfile functions.
int ov_test_callbacks(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks); |
0 for success less than zero for failure:
- OV_EREAD - A read from media returned an error.
- OV_ENOTVORBIS - Bitstream contains no 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.
Windows applications should not use ov_test() due to the likelihood of CRT linking mismatches and runtime protection faults [ov_open:a]. ov_test_callbacks() is a safe substitute; specifically:
ov_test_callbacks(f, vf, initial, ibytes, OV_CALLBACKS_DEFAULT);... provides exactly the same functionality as ov_test() but will always work correctly under Windows, regardless of linking setup details.
copyright © 2000-2010 Xiph.Org |
|
Vorbisfile documentation |
vorbisfile version 1.3.2 - 20101101 |