Main Page Modules Alphabetical List Compound List File List Compound Members File Members

# decmpa.h File Reference

Specifies the DecMPA API. More...

Go to the source code of this file.

## Compounds

struct | DecMPA_Callbacks
| This structure contains pointers to the functions that are used to read the MP3 data during DecMPA_Decode. More...
struct | DecMPA_MPEGHeader
| This structure provides information extracted from an MPEG Audio header. More...
struct | DecMPA_OutputFormat
| DecMPA_OutputFormat objects are used to specify the format of the decoded audio data that is returned by DecMPA_Decode. More...

## Defines

#define | DECMPA_VERSION 1
| DecMPA API version number.
#define | DECMPA_CC
| Macro for the calling convention used by DecMPA functions.
#define | DECMPA_OK 0
| The operation has been successfully completed.
#define | DECMPA_END 1
| The end of the stream was reached and there is no more data to decode.
#define | DECMPA_ERROR_PARAM (-1)
| An invalid parameter was passed to a function.
#define | DECMPA_ERROR_UNSUPPORTED (-2)
| The operation is not supported.
#define | DECMPA_ERROR_MEMORY (-3)
| There is not enough free memory.
#define | DECMPA_ERROR_INTERNAL (-4)
| An internal error occurred in the decoding routines.
#define | DECMPA_ERROR_DECODE (-5)
| Indicates an error during decoding, which usually means that the input data is invalid or corrupted.
#define | DECMPA_ERROR_READ (-6)
| An error occurred during the reading of new data.
#define | DECMPA_ERROR_SEEK (-7)
| An error occurred when it was tried to seek to a different position in the data stream.
#define | DECMPA_ERROR_OPENFILE (-8)
| An error occurred when opening a file.
#define | DECMPA_ERROR_WRONGSTATE (-9)
| The decoder is in the wrong state to perform the specified function.
#define | DECMPA_ERROR_NOTAVAILABLE (-10)
| The requested resource is not available.
#define | DECMPA_ERROR_INCOMPATIBLEVERSION (-11)
| The version of the DecMPA library that is used is incompatible:.
#define | DECMPA_PARAM_OUTPUT 0
| Specifies the format DecMPA will use to output the decoded audio samples.
#define | DECMPA_PARAM_PROVIDEID3V2 1
| Specifies wether the decoder should load a leading ID3v2 tag and make it available through DecMPA_GetID3v2Data.
#define | DECMPA_PARAMCOUNT 2
| Constant indicating the number of definable parameters.
#define | DECMPA_YES 1
| Indicates that the specified function is activated.
#define | DECMPA_NO 0
| Indicates that the specified function is not activated.
#define | DECMPA_OUTPUT_INT16 0
| Indicates that the audio samples are signed 16 bit integers (one per channel).
#define | DECMPA_OUTPUT_FLOAT 1
| Indicates that the audio samples are floats (one per channel).

## Functions

int | DecMPA_CreateUsingFile (void **ppDecoder, const char *sFilePath, int APIVersion)
| Creates a new decoder that obtains its input data from a file.
int | DecMPA_CreateUsingCallbacks (void **ppDecoder, const DecMPA_Callbacks *pCallbacks, void *pCallbackContext, int APIVersion)
| Creates a new decoder that obtains its input data using callback functions.
int | DecMPA_SetParam (void *pDecoder, int ID, long Value)
| Sets additional DecMPA parameters.
long | DecMPA_GetParam (void *pDecoder, int ID)
| Returns the current value of a DecMPA parameter.
int | DecMPA_Decode (void *pDecoder, void *pBuffer, long nBufferBytes, long *pBytesDecoded)
| Decodes some data and stores it in the supplied buffer.
int | DecMPA_DecodeNoData (void *pDecoder, long *pDecodedBytes)
| This is a special version of DecMPA_Decode that does not actually decode any MPEG Audio data, but only decodes the header information.
int | DecMPA_SeekToTime (void *pDecoder, long Millis)
| Changes the decoding position to the specified time, relative to the beginning of the data stream.
int | DecMPA_GetTime (void *pDecoder, long *pTime)
| Retrieves the current decoding time.
int | DecMPA_GetDuration (void *pDecoder, long *pDuration)
| Retrieves the time that it takes to play back the whole data stream.
int | DecMPA_GetOutputFormat (void *pDecoder, DecMPA_OutputFormat *pFormat)
| Retrieves the format of the data that was returned by the last call to DecMPA_Decode.
int | DecMPA_OutputFormatChanged (void *pDecoder)
| Checks wether the output format has changed during the last call to DecMPA_Decode.
int | DecMPA_GetMPEGHeader (void *pDecoder, DecMPA_MPEGHeader *pHeader)
| Retrieve mpeg header of the data that was returned by the last call to DecMPA_Decode.
int | DecMPA_GetID3v2Data (void *pDecoder, unsigned char **ppData, long *pDataSize)
| Returns the file's ID3v2 tag, if it has one.
void | DecMPA_Destroy (void *pDecoder)
| Destroys a decoder.
int | DecMPA_GetVersion (void)
| Returns the version number of the DecMPA API used by the library.

## Detailed Description

Specifies the DecMPA API.