Skip to content

Parrot-Developers/libaudio-encode

Repository files navigation

libaudio-encode - Audio encoding library

libaudio-encode is a C library to handle the encoding of audio on various platforms with a common API.

Implementations

The following implementations are available:

  • Fake AAC (generate silent AAC samples)
  • Fraunhofer FDK AAC (software encoding)

The application can force using a specific implementation or let the library decide according to what is supported by the platform.

Dependencies

The library depends on the following Alchemy modules:

  • libaac
  • libaudio-defs
  • libaudio-encode-core
  • libfutils
  • libmedia-buffers
  • libmedia-buffers-memory
  • libmedia-buffers-memory-generic
  • libpomp
  • libulog
  • (optional) fdk-aac (for FDK AAC support)

Building

Building is activated by enabling libaudio-encode in the Alchemy build configuration.

Operation

Some encoders need the input buffers to originate from their 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 encoding is asynchronous: the application pushes buffers to encode in the input queue and is notified of encoded frames through a callback function.

Threading model

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.

Testing

The library can be tested using the provided aenc command-line tool which takes as input a raw WAVE file and can optionally output an encoded AAC bitstream.

To build the tool, enable aenc in the Alchemy build configuration.

For a list of available options, run

$ aenc -h

About

Audio encoding library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published