3 #include "AudioConfig.h"
4 #include "AudioTools/CoreAudio/AudioOutput.h"
5 #include "AudioTools/CoreAudio/AudioStreams.h"
6 #include "AudioTools/CoreAudio/Buffers.h"
7 #include "AudioOutput.h"
43 c.channel1 = sample[0];
44 c.channel2 = sample[1];
45 return callback_buffer_ptr->
write(c);
55 size_t read(Frame *src,
size_t len) {
56 return active ? this->callback_buffer_ptr->
readArray(src, len) : 0;
63 virtual size_t writeExt(
const uint8_t *data,
size_t len) {
64 return callback_buffer_ptr->
writeArray((Frame *)data, len /
sizeof(Frame));
67 virtual size_t readExt(uint8_t *data,
size_t len) {
68 return callback_buffer_ptr->
readArray((Frame *)data, len /
sizeof(Frame));
81 this->channels = channels;
84 virtual size_t write(
const uint8_t *data,
size_t len) {
86 int16_t *v = (int16_t *)data;
88 result = p_out->ConsumeSamples(v, len / 2);
90 LOGE(
"Only 2 Channels are supported");