Chris@1: Error return codes possible from libvorbis and libvorbisfile: Chris@1: Chris@1: All 'failure' style returns are <0; this either indicates a generic Chris@1: 'false' value (eg, ready? T or F) or an error condition. Code can Chris@1: safely just test for < 0, or look at the specific return code for more Chris@1: detail. Chris@1: Chris@1: *** Return codes: Chris@1: Chris@1: OV_FALSE The call returned a 'false' status (eg, ov_bitrate_instant Chris@1: can return OV_FALSE if playback is not in progress, and thus Chris@1: there is no instantaneous bitrate information to report. Chris@1: Chris@1: OV_HOLE libvorbis/libvorbisfile is alerting the application that Chris@1: there was an interruption in the data (one of: garbage Chris@1: between pages, loss of sync followed by recapture, or a Chris@1: corrupt page) Chris@1: Chris@1: OV_EREAD A read from media returned an error. Chris@1: Chris@1: OV_EFAULT Internal logic fault; indicates a bug or heap/stack Chris@1: corruption. Chris@1: Chris@1: OV_EIMPL The bitstream makes use of a feature not implemented in this Chris@1: library version. Chris@1: Chris@1: OV_EINVAL Invalid argument value. Chris@1: Chris@1: OV_ENOTVORBIS Bitstream/page/packet is not Vorbis data. Chris@1: Chris@1: OV_EBADHEADER Invalid Vorbis bitstream header. Chris@1: Chris@1: OV_EVERSION Vorbis version mismatch. Chris@1: Chris@1: OV_ENOTAUDIO Packet data submitted to vorbis_synthesis is not audio data. Chris@1: Chris@1: OV_EBADPACKET Invalid packet submitted to vorbis_synthesis. Chris@1: Chris@1: OV_EBADLINK Invalid stream section supplied to libvorbis/libvorbisfile, Chris@1: or the requested link is corrupt. Chris@1: Chris@1: OV_ENOSEEK Bitstream is not seekable. Chris@1: Chris@1: Chris@1: **************************************************************** Chris@1: *** Libvorbis functions that can return failure/error codes: Chris@1: Chris@1: int vorbis_analysis_headerout() Chris@1: OV_EIMPL Chris@1: Chris@1: int vorbis_analysis_wrote() Chris@1: OV_EINVAL Chris@1: Chris@1: int vorbis_synthesis_headerin() Chris@1: OV_ENOTVORBIS, OV_EVERSION, OV_EBADHEADER Chris@1: Chris@1: int vorbis_synthesis() Chris@1: OV_ENOTAUDIO, OV_EBADPACKET Chris@1: Chris@1: int vorbis_synthesis_read() Chris@1: OV_EINVAL Chris@1: Chris@1: **************************************************************** Chris@1: *** Libvorbisfile functions that can return failure/error codes: Chris@1: Chris@1: int ov_open_callbacks() Chris@1: OV_EREAD, OV_ENOTVORBIS, OV_EVERSION, OV_EBADHEADER, OV_FAULT Chris@1: Chris@1: int ov_open() Chris@1: OV_EREAD, OV_ENOTVORBIS, OV_EVERSION, OV_EBADHEADER, OV_FAULT Chris@1: Chris@1: long ov_bitrate() Chris@1: OV_EINVAL, OV_FALSE Chris@1: Chris@1: long ov_bitrate_instant() Chris@1: OV_FALSE Chris@1: Chris@1: ogg_int64_t ov_raw_total() Chris@1: OV_EINVAL Chris@1: Chris@1: ogg_int64_t ov_pcm_total() Chris@1: OV_EINVAL Chris@1: Chris@1: double ov_time_total() Chris@1: OV_EINVAL Chris@1: Chris@1: int ov_raw_seek() Chris@1: OV_ENOSEEK, OV_EINVAL, OV_BADLINK Chris@1: Chris@1: int ov_pcm_seek_page() Chris@1: OV_ENOSEEK, OV_EINVAL, OV_EREAD, OV_BADLINK, OV_FAULT Chris@1: Chris@1: int ov_pcm_seek() Chris@1: OV_ENOSEEK, OV_EINVAL, OV_EREAD, OV_BADLINK, OV_FAULT Chris@1: Chris@1: int ov_time_seek() Chris@1: OV_ENOSEEK, OV_EINVAL, OV_EREAD, OV_BADLINK, OV_FAULT Chris@1: Chris@1: int ov_time_seek_page() Chris@1: OV_ENOSEEK, OV_EINVAL, OV_EREAD, OV_BADLINK, OV_FAULT Chris@1: Chris@1: long ov_read() Chris@1: OV_HOLE, OV_EBADLINK