Arduino LibHelix
|
Common Simple Arduino API. More...
#include <CommonHelix.h>
Public Member Functions | |
void | setOutput (Print &output) |
virtual bool | begin () |
Starts the processing. | |
virtual void | end () |
Releases the reserved memory. | |
virtual size_t | write (const void *in_ptr, size_t in_size) |
decodes the next segments from the input. 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 | |
virtual void | setDelay (int delayMs) |
Defines the delay that is added at each segment. | |
uint64_t | timeOfLastWrite () |
Provides the timestamp in ms of last write. | |
uint64_t | timeOfLastResult () |
Provides the timestamp in ms of last decoded result. | |
void | flush () |
Decode open packets. | |
virtual size_t | maxFrameSize ()=0 |
void | setMaxFrameSize (size_t len) |
Define your optimized maximum frame size in bytes. | |
virtual size_t | maxPCMSize ()=0 |
void | setMaxPCMSize (size_t len) |
Define your optimized maximum pcm buffer size in bytes. | |
void | setRaw (bool) |
Obsolete! | |
Protected Member Functions | |
bool | presync () |
make sure that we start with a valid sync: remove ID3 data | |
bool | resynch (int rc) |
bool | removeInvalidData (int pos) |
virtual size_t | writeChunk (const void *in_ptr, size_t in_size) |
virtual int | decode ()=0 |
Decode w/o parsing. | |
virtual bool | allocateDecoder ()=0 |
Allocate the decoder. | |
virtual int | findSynchWord (int offset=0)=0 |
virtual int | minFrameBufferSize () |
Common Simple Arduino API.
|
protectedpure virtual |
Finds the synchronization word in the frame buffer (starting from the indicated offset)
Implemented in libhelix::MP3DecoderHelix, and libhelix::AACDecoderHelix.
|
pure virtual |
Provides the maximum frame size in bytes - this is allocated on the heap and you can reduce the heap size my minimizing this value
Implemented in libhelix::MP3DecoderHelix, and libhelix::AACDecoderHelix.
|
pure virtual |
Provides the maximum pcm buffer size in bytes - this is allocated on the heap and you can reduce the heap size my minimizing this value
Implemented in libhelix::MP3DecoderHelix, and libhelix::AACDecoderHelix.
|
inlineprotected |
removes invalid data not starting with a synch word.
|
inlineprotected |
advance on invalid data, returns true if we need to continue the processing
|
inlineprotectedvirtual |
Prevent bug in underflow detection for AAC