文本文件  |  104行  |  2.67 KB

Error return codes possible from libvorbis and libvorbisfile:

All 'failure' style returns are <0; this either indicates a generic
'false' value (eg, ready?  T or F) or an error condition.  Code can
safely just test for < 0, or look at the specific return code for more
detail.

*** Return codes:

OV_FALSE        The call returned a 'false' status (eg, ov_bitrate_instant 
		can return OV_FALSE if playback is not in progress, and thus 
		there is no instantaneous bitrate information to report.

OV_HOLE		libvorbis/libvorbisfile is alerting the application that 
		there was an interruption in the data (one of: garbage 
		between pages, loss of sync followed by recapture, or a 
		corrupt page)

OV_EREAD        A read from media returned an error.

OV_EFAULT       Internal logic fault; indicates a bug or heap/stack 
		corruption.

OV_EIMPL        The bitstream makes use of a feature not implemented in this 
		library version.

OV_EINVAL       Invalid argument value.

OV_ENOTVORBIS	Bitstream/page/packet is not Vorbis data.

OV_EBADHEADER   Invalid Vorbis bitstream header.

OV_EVERSION	Vorbis version mismatch.

OV_ENOTAUDIO	Packet data submitted to vorbis_synthesis is not audio data.

OV_EBADPACKET	Invalid packet submitted to vorbis_synthesis.

OV_EBADLINK	Invalid stream section supplied to libvorbis/libvorbisfile, 
		or the requested link is corrupt. 

OV_ENOSEEK	Bitstream is not seekable.


****************************************************************
*** Libvorbis functions that can return failure/error codes:

int vorbis_analysis_headerout()
    OV_EIMPL

int vorbis_analysis_wrote()
    OV_EINVAL

int vorbis_synthesis_headerin()
    OV_ENOTVORBIS, OV_EVERSION, OV_EBADHEADER

int vorbis_synthesis()
    OV_ENOTAUDIO, OV_EBADPACKET

int vorbis_synthesis_read()
    OV_EINVAL

****************************************************************
*** Libvorbisfile functions that can return failure/error codes:

int ov_open_callbacks()   
    OV_EREAD, OV_ENOTVORBIS, OV_EVERSION, OV_EBADHEADER, OV_FAULT

int ov_open()
    OV_EREAD, OV_ENOTVORBIS, OV_EVERSION, OV_EBADHEADER, OV_FAULT

long ov_bitrate()
    OV_EINVAL, OV_FALSE

long ov_bitrate_instant()
    OV_FALSE

ogg_int64_t ov_raw_total()
    OV_EINVAL

ogg_int64_t ov_pcm_total()
    OV_EINVAL

double ov_time_total()
    OV_EINVAL

int ov_raw_seek()
    OV_ENOSEEK, OV_EINVAL, OV_BADLINK

int ov_pcm_seek_page()
    OV_ENOSEEK, OV_EINVAL, OV_EREAD, OV_BADLINK, OV_FAULT

int ov_pcm_seek()
    OV_ENOSEEK, OV_EINVAL, OV_EREAD, OV_BADLINK, OV_FAULT

int ov_time_seek()
    OV_ENOSEEK, OV_EINVAL, OV_EREAD, OV_BADLINK, OV_FAULT

int ov_time_seek_page()
    OV_ENOSEEK, OV_EINVAL, OV_EREAD, OV_BADLINK, OV_FAULT

long ov_read()
    OV_HOLE, OV_EBADLINK