9#define AUDIOTOOLS_VERSION "1.2.3"
10#define AUDIOTOOLS_MAJOR_VERSION 1
11#define AUDIOTOOLS_MINOR_VERSION 2
20#if __has_include("AudioConfigLocal.h")
21#include "AudioConfigLocal.h"
25#ifndef AUDIO_INCLUDE_CORE
26# define AUDIO_INCLUDE_CORE true
30#ifndef PREFER_FIXEDPOINT
31# define PREFER_FIXEDPOINT false
35#ifndef USE_AUDIOTOOLS_NS
36# define USE_AUDIOTOOLS_NS true
47#ifndef USE_AUDIO_LOGGING
48# define USE_AUDIO_LOGGING true
52# define LOG_LEVEL AudioLogger::Warning
56# define LOG_STREAM Serial
59#ifndef LOG_PRINTF_BUFFER_SIZE
60# define LOG_PRINTF_BUFFER_SIZE 303
64# define LOG_METHOD __PRETTY_FUNCTION__
68#ifndef USE_CHECK_MEMORY
69# define USE_CHECK_MEMORY false
74# define USE_OBSOLETE false
81#ifndef DEFAULT_BUFFER_SIZE
82# define DEFAULT_BUFFER_SIZE 1024
85#ifndef DEFAULT_SAMPLE_RATE
86# define DEFAULT_SAMPLE_RATE 44100
89#ifndef DEFAULT_CHANNELS
90# define DEFAULT_CHANNELS 2
93#ifndef DEFAULT_BITS_PER_SAMPLE
94# define DEFAULT_BITS_PER_SAMPLE 16
97#ifndef I2S_DEFAULT_PORT
98# define I2S_DEFAULT_PORT 0
101#ifndef I2S_BUFFER_SIZE
102# define I2S_BUFFER_SIZE 512
105#ifndef I2S_BUFFER_COUNT
106# define I2S_BUFFER_COUNT 6
109#ifndef ANALOG_BUFFER_SIZE
110# define ANALOG_BUFFER_SIZE 512
113#ifndef ANALOG_BUFFER_COUNT
114# define ANALOG_BUFFER_COUNT 6
117#ifndef A2DP_BUFFER_SIZE
118# define A2DP_BUFFER_SIZE 512
121#ifndef A2DP_BUFFER_COUNT
122# define A2DP_BUFFER_COUNT 30
125#ifndef CODEC_DELAY_MS
126# define CODEC_DELAY_MS 10
129#ifndef COPY_DELAY_ON_NODATA
130# define COPY_DELAY_ON_NODATA 10
133#ifndef COPY_RETRY_LIMIT
134# define COPY_RETRY_LIMIT 20
137#ifndef MAX_SINGLE_CHARS
138# define MAX_SINGLE_CHARS 8
143# define HTTP_MAX_LEN 1024
147#ifndef HTTP_CHUNKED_SIZE_MAX_LEN
148# define HTTP_CHUNKED_SIZE_MAX_LEN 80
152#ifndef USE_RESAMPLE_BUFFER
153# define USE_RESAMPLE_BUFFER true
159#ifndef PWM_BUFFER_SIZE
160# define PWM_BUFFER_SIZE 1024
163#ifndef PWM_BUFFER_COUNT
164# define PWM_BUFFER_COUNT 4
167#ifndef PWM_AUDIO_FREQUENCY
168# define PWM_AUDIO_FREQUENCY 30000
172#ifndef AUDIOTOOLS_METADATA_ICY_ASCII_ONLY
173#define AUDIOTOOLS_METADATA_ICY_ASCII_ONLY true
176#ifndef AUDIOTOOLS_METADATA_ICY_LIMIT
177#define AUDIOTOOLS_METADATA_ICY_LIMIT 400
201#if (defined(ARDUINO_SEEED_XIAO_NRF52840_SENSE) || defined(ARDUINO_ARDUINO_NANO33BLE) ) && !defined(ARDUINO_ARCH_ZEPHYR)
206#if defined(ARDUINO_ARCH_MBED_RP2040)
212#if defined(ARDUINO_ARCH_RP2040) && !defined(ARDUINO_ARCH_MBED)
222#if defined(ARDUINO_ARCH_STM32) || defined(STM32)
227#ifdef ARDUINO_ARCH_SAMD
233#if defined(ARDUINO_GIGA)
239#if defined(ARDUINO_ARCH_MBED_PORTENTA)
245#if defined(ARDUINO_ARCH_RENESAS) || defined(_RENESAS_RA_)
250#ifdef ARDUINO_ARCH_ZEPHYR
256#ifndef VS1053_DEFINED
258# define VS1053_DCS 16
259# define VS1053_DREQ 4
260# define VS1053_RESET 15
261# define VS1053_CS_SD -1
267#define VS1053_DEFAULT_VOLUME 0.7
274# define USE_STREAM_WRITE_OVERRIDE
277#ifndef ANALOG_MAX_SAMPLE_RATE
278# define ANALOG_MAX_SAMPLE_RATE 44100
281#ifndef PWM_MAX_SAMPLE_RATE
282# define PWM_MAX_SAMPLE_RATE 8000
285#ifndef URL_CLIENT_TIMEOUT
286# define URL_CLIENT_TIMEOUT 60000;
290#ifndef URL_HANDSHAKE_TIMEOUT
291# define URL_HANDSHAKE_TIMEOUT 120000
295# define USE_TASK false
298#ifndef USE_SERVER_ACCEPT
299# define USE_SERVER_ACCEPT false
303# define USE_ALLOCATOR false
306#ifndef USE_ESP32_LOGGER
307# define USE_ESP32_LOGGER false
311#ifndef USE_PRINT_FLUSH
312# define USE_PRINT_FLUSH true
315#ifndef ESP_IDF_VERSION_VAL
316# define ESP_IDF_VERSION_VAL(a, b , c) 0
320# define CHECK_MEMORY() checkMemory(true)
322# define CHECK_MEMORY()
325#pragma GCC diagnostic ignored "-Wunused-variable"
326#pragma GCC diagnostic ignored "-Wunused-function"
327#pragma GCC diagnostic ignored "-Wvla"
328#pragma GCC diagnostic ignored "-Wsign-compare"
329#pragma GCC diagnostic ignored "-Woverloaded-virtual"
330#pragma GCC diagnostic ignored "-Wdouble-promotion"
332#ifdef USE_NO_MEMACCESS
333#pragma GCC diagnostic ignored "-Wclass-memaccess"
336#ifdef USE_INITIALIZER_LIST
337#pragma GCC diagnostic ignored "-Wnarrowing"
348 #ifdef USE_3BYTE_INT24