40 return ctx !=
nullptr;
52 operator bool() {
return ctx !=
nullptr; }
55 LOGI(
"write: %d", len);
84 return is_ok ? len : 0;
102 LOGI(
"samples: %d", samples);
105 for (
int j = 0;
j < samples;
j++) {
111 LOGE(
"aptX decoding failed to write decoded data");
122 LOGE(
"aptX decoding failed, synchronizing");
127 LOGE(
"aptX synchronization successful, dropped %lu byte%s",
133 LOGE(
"aptX decoding failed, synchronizing");
139 if (!
syncing)
LOGE(
"aptX decoding failed, synchronizing");
140 LOGE(
"aptX synchronization successful, dropped %lu byte%s",
145 LOGI(
"aptX synchronization successful");
155 if (length >= 4 &&
memcmp(input_buffer,
"\x4b\xbf\x4b\xbf", 4) == 0) {
157 LOGE(
"aptX audio stream (not aptX HD)");
160 }
else if (length >= 6 &&
161 memcmp(input_buffer,
"\x73\xbe\xff\x73\xbe\xff", 6) == 0) {
163 LOGE(
"aptX HD audio stream");
167 if (length >= 4 &&
memcmp(input_buffer,
"\x6b\xbf\x6b\xbf", 4) == 0) {
168 LOGE(
"standard aptX audio stream - not supported");
171 LOGE(
"No aptX nor aptX HD audio stream");
203 LOGI(
"is_hd: %s",
is_hd ?
"true" :
"false");
210 if (
ctx !=
nullptr) {
227 virtual const char *
mime() {
return "audio/aptx"; }
248 LOGI(
"write: %d", len);
249 if (
ctx ==
nullptr)
return 0;
#define LOGW(...)
Definition AudioLoggerIDF.h:29
#define TRACEI()
Definition AudioLoggerIDF.h:32
#define LOGI(...)
Definition AudioLoggerIDF.h:28
#define LOGE(...)
Definition AudioLoggerIDF.h:30