1 API specification
This chapter describes the Ahead AAC library API functions and explains how to use
them and in which order.
1.1 NeAACDecGetCapabilities
unsigned long NEAACAPI NeAACDecGetCapabilities(void);
This function returns the capabilities of the decoder in a 32 bit unsigned integer. The
bits that are set in the 32 bit unsigned integer define with which capabilities the
library has been compiled.
The following capabilities are defined (../include/neaacdec.h)
#define LC_DEC_CAP (1<<0) /* Can decode LC */
#define MAIN_DEC_CAP (1<<1) /* Can decode MAIN */
#define LTP_DEC_CAP (1<<2) /* Can decode LTP */
#define LD_DEC_CAP (1<<3) /* Can decode LD */
#define ERROR_RESILIENCE_CAP (1<<4) /* Can decode ER */
#define FIXED_POINT_CAP (1<<5) /* Fixed point */
This function can be called anytime.
1.2 NeAACDecOpen
NeAACDecHandle NEAACAPI NeAACDecOpen(void);
Returns a handle to a decoder context.
1.3 NeAACDecClose
void NEAACAPI NeAACDecClose(NeAACDecHandle hDecoder);
Closes a decoder context that has been opened by NeAACDecOpen.
1.4 NeAACDecGetCurrentConfiguration
NeAACDecConfigurationPtr NEAACAPI
NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder);
Returns the current decoder library configuration.
1.5 NeAACDecSetConfiguration
unsigned char NEAACAPI NeAACDecSetConfiguration(NeAACDecHandle
hDecoder, NeAACDecConfigurationPtr config);
Sets a new configuration structure for the decoder library.
Return values:
0 – Error, invalid configuration.
1 – OK
1.6 NeAACDecInit
long NEAACAPI NeAACDecInit(NeAACDecHandle hDecoder, unsigned char
*buffer, unsigned long buffer_size, unsigned long *samplerate,
unsigned char *channels);