3#include "AudioTools/AudioCodecs/AudioCodecsBase.h"
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();
96 virtual void end()
override {
…}
101 virtual _AACFrameInfo audioInfoEx(){
102 return aac->audioInfo();
107 auto i = audioInfoEx();
116 if(info_notifications_active){
117 notifyAudioChange(info);
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;
129 int act_write = aac->write(data8+processed, min(open, DEFAULT_BUFFER_SIZE));
131 processed += act_write;
122 size_t write(
const uint8_t* data,
size_t len)
override {
…}
137 virtual operator bool()
override {
138 return aac!=
nullptr && (bool)*aac;
137 virtual operator bool()
override {
…}
148 if (p_helix!=
nullptr){
155 LOGW(
"sample_rate: %d", i.sampRateOut);
162 return aac->maxFrameSize();
167 aac->setMaxFrameSize(len);
170 void setAudioInfoNotifications(
bool active){
171 info_notifications_active = active;
176 return aac->maxPCMSize();
181 aac->setMaxPCMSize(len);
185 libhelix::AACDecoderHelix *aac=
nullptr;
186 bool info_notifications_active =
true;