2 #include "AudioConfig.h"
3 #if defined(USE_CONCURRENCY) && defined(USE_URL_ARDUINO)
25 urlStream.setReadBufferSize(readBufferSize);
26 taskStream.setInput(urlStream);
30 int readBufferSize = DEFAULT_BUFFER_SIZE) {
32 urlStream.setReadBufferSize(readBufferSize);
34 taskStream.setInput(urlStream);
38 int readBufferSize = DEFAULT_BUFFER_SIZE) {
40 urlStream.setReadBufferSize(readBufferSize);
43 taskStream.setInput(urlStream);
46 virtual bool setMetadataCallback(
void (*fn)(
MetaDataType info,
58 virtual bool begin(
const char* urlStr,
const char* acceptMime =
nullptr,
59 MethodID action = GET,
const char* reqMime =
"",
60 const char* reqData =
"")
override {
63 bool result = urlStream.begin(urlStr, acceptMime, action, reqMime, reqData);
69 virtual void end()
override {
75 virtual int available()
override {
return taskStream.
available(); }
77 virtual size_t readBytes(uint8_t* data,
size_t len)
override {
78 size_t result = taskStream.
readBytes(data, len);
79 LOGD(
"%s: %zu -> %zu", LOG_METHOD, len, result);
83 virtual int read()
override {
return taskStream.
read(); }
85 virtual int peek()
override {
return taskStream.
peek(); }
88 virtual void flush()
override {}