5#ifndef MAX_ZERO_READ_COUNT
6#define MAX_ZERO_READ_COUNT 3
9#ifndef CHANNEL_SELECT_BUFFER_SIZE
10#define CHANNEL_SELECT_BUFFER_SIZE 256
33 if (transform ==
nullptr) {
34 LOGE(
"transform is NULL");
38 LOGE(
"p_stream is NULL");
52 LOGD(
"TransformationReader::readBytes: %d", (
int)len);
58 LOGE(
"p_stream is NULL");
64 int size = (0.5f /
p_transform->getByteFactor() * len);
67 LOGI(
"read size: %d", size);
107 LOGD(
"TransformationReader::readBytes: %d -> %d", (
int)len,
result_len);
183 LOGD(
"ReformatBaseStream::readBytes: %d", (
int)len);
184 return reader.readBytes(data, len);
376 for (
int j = 0;
j <
vector.size();
j++) {
382 for (
int j = 0;
j <
vector.size();
j++) {
388 for (
auto& out :
vector) {
396 int written = out->write(copy + start, open);
405 for (
int j = 0;
j <
vector.size();
j++) {
417 if (
tmp !=
nullptr &&
tmp->isDeletable()) {
620 int toread = min(1024, open);
630 if (bytes_per_second > 0) {
634 LOGE(
"AudioInfo not defined");
661 for (
auto&
ch : out.channels) {
679 def.p_audio_info = &out;
691 def.p_audio_info = &out;
727 def.p_audio_info = &out;
740 def.p_audio_info = &out;
746 LOGD(
"write %d", (
int)len);
766 result.
channels = info.channels.size();
781 template <
typename T>
784 int sample_count = size /
sizeof(
T);
786 T* data = (
T*)buffer;
788 for (
int i = 0; i < sample_count; i +=
cfg.
channels) {
793 for (
auto&
ch : out.channels) {
802 if (out.buffer.availableForWrite() <
sizeof(
out_frame)) {
803 out.p_out->write(out.buffer.data(), out.buffer.available());
#define CHANNEL_SELECT_BUFFER_SIZE
Definition AudioIO.h:10
#define MAX_ZERO_READ_COUNT
Definition AudioIO.h:6
#define TRACED()
Definition AudioLoggerIDF.h:31
#define LOGI(...)
Definition AudioLoggerIDF.h:28
#define LOGD(...)
Definition AudioLoggerIDF.h:27
#define LOGE(...)
Definition AudioLoggerIDF.h:30
#define DEFAULT_BUFFER_SIZE
Definition avr.h:20