7#include "AACDecoderHelix.h"
24 aac =
new libhelix::AACDecoderHelix();
26 aac->setReference(
this);
28 LOGE(
"Not enough memory for libhelix");
38 aac =
new libhelix::AACDecoderHelix(out_stream);
40 aac->setReference(
this);
42 LOGE(
"Not enough memory for libhelix");
55 aac =
new libhelix::AACDecoderHelix(out_stream);
57 aac->setReference(
this);
59 LOGE(
"Not enough memory for libhelix");
70 if (
aac !=
nullptr)
delete aac;
81 if (
aac !=
nullptr)
aac->setOutput(out_stream);
96 virtual void end()
override {
98 if (
aac !=
nullptr)
aac->end();
106 if (i.nChans != 0 && i.bitsPerSample != 0 && i.sampRateOut != 0) {
122 size_t write(
const uint8_t *data,
size_t len)
override {
123 LOGD(
"AACDecoderHelix::write: %d", (
int)len);
124 if (
aac ==
nullptr)
return 0;
127 uint8_t *data8 = (uint8_t *)data;
132 processed += act_write;
138 virtual operator bool()
override {
return aac !=
nullptr && (bool)*
aac; }
147 if (p_helix !=
nullptr) {
154 LOGW(
"sample_rate: %d / channels: %d", i.sampRateOut, i.nChans);
178 libhelix::AACDecoderHelix *
aac =
nullptr;
#define LOGW(...)
Definition AudioLoggerIDF.h:29
#define TRACED()
Definition AudioLoggerIDF.h:31
#define LOGD(...)
Definition AudioLoggerIDF.h:27
#define LOGE(...)
Definition AudioLoggerIDF.h:30
#define DEFAULT_BUFFER_SIZE
Definition avr.h:20