3 #include "AudioTools/AudioCodecs/AudioCodecsBase.h"
4 #include "AudioTools/CoreAudio/Buffers.h"
35 bool begin()
override {
38 bool rc = p_dec->
begin();
51 if (is_setup) rbuffer.resize(size);
54 size_t write(
const uint8_t *data,
size_t len)
override {
57 size_t result = queue.write((uint8_t *)data, len);
68 StreamingDecoder* getStreamingDecoder(){
72 operator bool()
override {
return active; }
76 bool is_setup =
false;
78 StreamingDecoder *p_dec =
nullptr;
79 RingBuffer<uint8_t> rbuffer{0};
80 QueueStream<uint8_t> queue{rbuffer};
84 rbuffer.resize(buffer_size);
91 using DecoderFromStreaming = DecoderAdapter;