opusfile: Error Codes

| opusfile 0.8 Stand-alone decoder library for .opus files.

Error Codes

## List of possible error codes
Many of the functions in this library return a negative error code when a function fails. This list provides a brief explanation of the common errors. See each individual function for more details on what a specific error code means in that context.
#define | OP_FALSE (-1)
| A request did not succeed. More...
#define | OP_EOF (-2)
#define | OP_HOLE (-3)
| There was a hole in the page sequence numbers (e.g., a page was corrupt or missing). More...
#define | OP_EREAD (-128)
| An underlying read, seek, or tell operation failed when it should have succeeded. More...
#define | OP_EFAULT (-129)
| A `NULL` pointer was passed where one was unexpected, or an internal memory allocation failed, or an internal library error was encountered. More...
#define | OP_EIMPL (-130)
| The stream used a feature that is not implemented, such as an unsupported channel family. More...
#define | OP_EINVAL (-131)
| One or more parameters to a function were invalid. More...
#define | OP_ENOTFORMAT (-132)
| A purported Ogg Opus stream did not begin with an Ogg page, a purported header packet did not start with one of the required strings, "OpusHead" or "OpusTags", or a link in a chained file was encountered that did not contain any logical Opus streams. More...
#define | OP_EBADHEADER (-133)
| A required header packet was not properly formatted, contained illegal values, or was missing altogether. More...
#define | OP_EVERSION (-134)
| The ID header contained an unrecognized version number. More...
#define | OP_ENOTAUDIO (-135)
#define | OP_EBADPACKET (-136)
| An audio packet failed to decode properly. More...
#define | OP_EBADLINK (-137)
| We failed to find data we had seen before, or the bitstream structure was sufficiently malformed that seeking to the target destination was impossible. More...
#define | OP_ENOSEEK (-138)
| An operation that requires seeking was requested on an unseekable stream. More...
#define | OP_EBADTIMESTAMP (-139)
| The first or last granule position of a link failed basic validity checks. More...

## Detailed Description

## Macro Definition Documentation

## § OP_FALSE

#define OP_FALSE (-1)

A request did not succeed.

## § OP_HOLE

#define OP_HOLE (-3)

There was a hole in the page sequence numbers (e.g., a page was corrupt or missing).

## § OP_EREAD

#define OP_EREAD (-128)

An underlying read, seek, or tell operation failed when it should have succeeded.

## § OP_EFAULT

#define OP_EFAULT (-129)

A `NULL` pointer was passed where one was unexpected, or an internal memory allocation failed, or an internal library error was encountered.

## § OP_EIMPL

#define OP_EIMPL (-130)

The stream used a feature that is not implemented, such as an unsupported channel family.

## § OP_EINVAL

#define OP_EINVAL (-131)

One or more parameters to a function were invalid.

## § OP_ENOTFORMAT

#define OP_ENOTFORMAT (-132)

A purported Ogg Opus stream did not begin with an Ogg page, a purported header packet did not start with one of the required strings, "OpusHead" or "OpusTags", or a link in a chained file was encountered that did not contain any logical Opus streams.

## § OP_EBADHEADER

#define OP_EBADHEADER (-133)

A required header packet was not properly formatted, contained illegal values, or was missing altogether.

## § OP_EVERSION

#define OP_EVERSION (-134)

The ID header contained an unrecognized version number.

## § OP_EBADPACKET

#define OP_EBADPACKET (-136)

An audio packet failed to decode properly.

This is usually caused by a multistream Ogg packet where the durations of the individual Opus packets contained in it are not all the same.

## § OP_EBADLINK

#define OP_EBADLINK (-137)

We failed to find data we had seen before, or the bitstream structure was sufficiently malformed that seeking to the target destination was impossible.

## § OP_ENOSEEK

#define OP_ENOSEEK (-138)

An operation that requires seeking was requested on an unseekable stream.

## § OP_EBADTIMESTAMP

#define OP_EBADTIMESTAMP (-139)

The first or last granule position of a link failed basic validity checks.