cannam@86: cannam@86: cannam@86: cannam@86: Vorbisfile - function - ov_test cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86:

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

cannam@86: cannam@86:

ov_test

cannam@86: cannam@86:

declared in "vorbis/vorbisfile.h";

cannam@86: cannam@86:

cannam@86: This partially opens a vorbis file to test for Vorbis-ness. It loads cannam@86: the headers for the first chain and tests for seekability (but does not seek). cannam@86: Use ov_test_open() to finish opening the file cannam@86: or ov_clear to close/free it. cannam@86:

cannam@86: cannam@86:

WARNING for Windows developers: Do not use ov_test() cannam@86: in Windows applications; Windows linking places restrictions on cannam@86: passing FILE * handles successfully, and ov_test() runs afoul cannam@86: of these restrictions [a] in exactly the same cannam@86: way as ov_open(). See the ov_test_callbacks() page for cannam@86: details on using ov_test_callbacks() instead. cannam@86:

cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86:
cannam@86:

cannam@86: int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
cannam@86: 
cannam@86:
cannam@86: cannam@86:

Parameters

cannam@86:
cannam@86:
f
cannam@86:
File pointer to an already opened file cannam@86: or pipe (it need not be seekable--though this obviously restricts what cannam@86: can be done with the bitstream).
cannam@86:
vf
cannam@86:
A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile cannam@86: functions. Once this has been called, the same OggVorbis_File cannam@86: struct should be passed to all the libvorbisfile functions.
cannam@86:
initial
cannam@86:
Typically set to NULL. This parameter is useful if some data has already been cannam@86: read from the file and the stream is not seekable. It is used in conjunction with ibytes. In this case, initial cannam@86: should be a pointer to a buffer containing the data read.
cannam@86:
ibytes
cannam@86:
Typically set to 0. This parameter is useful if some data has already been cannam@86: read from the file and the stream is not seekable. In this case, ibytes cannam@86: should contain the length (in bytes) of the buffer. Used together with initial
cannam@86:
cannam@86: cannam@86: cannam@86:

Return Values

cannam@86:
cannam@86:
  • 0 for success
  • cannam@86: cannam@86:
  • less than zero for failure:
  • cannam@86: cannam@86:
    cannam@86:

    cannam@86: cannam@86:

    Notes

    cannam@86: cannam@86: All the notes from ov_open() apply to ov_test(). cannam@86: cannam@86:

    cannam@86:
    cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86:

    copyright © 2000-2010 Xiph.Org

    Ogg Vorbis

    Vorbisfile documentation

    vorbisfile version 1.3.2 - 20101101

    cannam@86: cannam@86: cannam@86: cannam@86: