libaudio-decode is a C library to handle the decoding of audio on various platforms with a common API.
The following implementations are available:
- Fraunhofer FDK AAC (software decoding)
The application can force using a specific implementation or let the library decide according to what is supported by the platform.
The library depends on the following Alchemy modules:
- libaudio-defs
- libfutils
- libmedia-buffers
- libmedia-buffers-memory
- libulog
- (optional) fdk-aac (for FDK AAC support)
Building is activated by enabling libaudio-decode in the Alchemy build configuration.
Operations are asynchronous: the application pushes buffers to decode in the input queue and is notified of decoded frames through a callback function.
Some decoders need the input buffers to be originating from its own buffer pool; when the input buffer pool returned by the library is not NULL it must be used and input buffers cannot be shared with other audio pipeline elements.
The library is designed to run on a libpomp event loop (pomp_loop, see libpomp documentation). All API functions must be called from the pomp_loop thread. All callback functions (frame_output, flush or stop) are called from the pomp_loop thread.
The library can be tested using the provided adec command-line tool which takes as input an AAC-encoded file and can optionally output a raw WAV file.
To build the tool, enable adec in the Alchemy build configuration.
For a list of available options, run
$ adec -h