Arduino LibHelix

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AACDecoderHelix Class Reference

A simple Arduino API for the libhelix AAC decoder. The data us provided with the help of write() calls. The decoded result is available either via a callback method or via an output stream. More...

`#include <AACDecoderHelix.h>`

Inheritance diagram for AACDecoderHelix:

## Public Member Functions
| AACDecoderHelix (Print &output, AACInfoCallback infoCallback=nullptr)
| AACDecoderHelix (AACDataCallback dataCallback)
void | begin ()
| Starts the processing.
void | end ()
| Releases the reserved memory.
_AACFrameInfo_t | audioInfo ()
| Provides the last available _AACFrameInfo_t.
Public Member Functions inherited from CommonHelix
virtual size_t | write (const void *in_ptr, size_t in_size)
| decodes the next segments from the intput. The data can be provided in one short or in small incremental pieces. It is suggested to be called in the Arduino Loop. If the provided data does not fit into the buffer it is split up into small pieces that fit
| operator bool ()
| returns true if active

## Protected Member Functions
size_t | maxFrameSize ()
| Provides the maximum frame size - this is allocated on the heap and you can reduce the heap size my minimizing this value.
size_t | maxPCMSize ()
| Provides the maximum pcm buffer size - this is allocated on the heap and you can reduce the heap size my minimizing this value.
int | findSynchWord (int offset=0)
| Finds the synchronization word in the frame buffer (starting from the indicated offset)
void | decode (Range r)
| decods the data and removes the decoded frame from the buffer
void | provideResult (_AACFrameInfo_t &info)
virtual void | checkMemory ()
| checks the consistency of the memory
Protected Member Functions inherited from CommonHelix
void | setMaxFrameSize (size_t len)
| Define your optimized maximum frame size.
void | setMaxPWMSize (size_t len)
| Define your optimized maximum pcm buffer size.
size_t | appendToBuffer (const void *in_ptr, int in_size)
| we add the data to the buffer until it is full
size_t | writeFrame (const void *in_ptr, size_t in_size)
| appends the data to the frame buffer and decodes
Range | synchronizeFrame ()
| returns true if we have a valid start and end synch word.
Range | frameRange ()
| determines the next start and end synch word in the buffer
void | advanceFrameBuffer (int offset)

## Protected Attributes
AACDecoder | decoder
_AACFrameInfo_t | _AACFrameInfo_t
AACDataCallback | pcmCallback = nullptr
AACInfoCallback | infoCallback = nullptr
Protected Attributes inherited from CommonHelix
bool | active = false
Print * | out = nullptr
Stream * | in = nullptr
uint32_t | buffer_size = 0
uint8_t * | frame_buffer = nullptr
short * | pcm_buffer = nullptr
size_t | max_frame_size = 0
size_t | max_pcm_size = 0
size_t | frame_counter = 0

## Detailed Description

A simple Arduino API for the libhelix AAC decoder. The data us provided with the help of write() calls. The decoded result is available either via a callback method or via an output stream.

The documentation for this class was generated from the following file:

- src/AACDecoderHelix.h