arduino-audio-tools
Loading...
Searching...
No Matches
CodecOpusOgg.h File Reference

Go to the source code of this file.

Classes

class  Allocator
 Memory allocateator which uses malloc. More...
class  AllocatorESP32
 ESP32 Memory allocateator which forces the allocation with the defined attributes (default MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL). More...
class  AllocatorExt
 Memory allocateator which uses ps_malloc (on the ESP32) and if this fails it resorts to malloc. More...
class  AllocatorPSRAM
 Memory allocateator which uses ps_malloc to allocate the memory in PSRAM on the ESP32. More...
class  AllocatorZephyr
 Zephyr allocator using the kernel heap (k_malloc / k_free). This is the standard allocator for Zephyr builds. More...
struct  AppropriateSumType< T >
 We reduce the number of samples in a datastream by summing (binning) or averaging. This will result in the same number of channels but binSize times less samples. If Average is true the sum is divided by binSize. More...
struct  AppropriateSumType< int16_t >
struct  AppropriateSumType< int24_t >
struct  AppropriateSumType< int32_t >
struct  AppropriateSumType< int8_t >
class  AudioDecoder
 Decoding of encoded audio into PCM data. More...
class  AudioDecoderExt
 Extended AudioDecoder interface to support block size configuration. More...
class  AudioEncoder
 Encoding of PCM data. More...
class  AudioEncoderExt
 Extended AudioEncoder interface to support block size configuration. More...
struct  AudioInfo
 Basic Audio information which drives e.g. I2S. More...
struct  AudioInfoFormat
 AudioInfo extended with a WAVEFORMATEX-style codec tag (the "wav code"): identifies the codec (PCM, AAC, ALAC, ...) - AudioFormat::UNKNOWN if not determined. mime() derives the corresponding mime type from format - not a separately stored field, so it can never go stale. More...
class  AudioInfoSource
 Supports the subscription to audio change notifications. More...
class  AudioInfoSupport
 Supports changes to the sampling rate, bits and channels. More...
class  AudioInputMonitor
 Monitors audio input and reports if the volume exceeds a specified limit within a given period. More...
class  AudioOutput
 Abstract Audio Ouptut class. More...
class  AudioStream
 Base class for all Audio Streams. It support the boolean operator to test if the object is ready with data. More...
class  AudioStreamWrapper
 To be used to support implementations where the readBytes is not virtual. More...
class  AudioTime
 Tools for calculating timer values. More...
class  AudioTimer
 Common Interface definition for AudioTimer. More...
class  AudioTimerDriverAVR
 Repeating Timer functions for repeated execution: Plaease use the typedef AudioTimer. More...
class  AudioTimerDriverBase
class  AudioTimerDriverESP32
 Repeating Timer functions for simple scheduling of repeated execution using esp_timer_create(). More...
class  AudioTimerDriverESP32Legacy
 Repeating Timer functions for simple scheduling of repeated execution. The basic logic is taken from https://www.toptal.com/embedded/esp32-audio-sampling. Plaease use the typedef AudioTimer. More...
class  AudioTimerDriverESP8266
 Repeating Timer functions for repeated execution: Plaease use the typedef AudioTimer. More...
class  AudioTimerDriverLinux
 Repeating software timer driver for Desktop using std::thread. More...
class  AudioTimerDriverMBED
 Repeating Timer functions for repeated execution: Plaease use the typedef AudioTimer. More...
class  AudioTimerDriverRenesas
 Repeating Timer functions for repeated execution: Plaease use the typedef AudioTimer. By default we use a new GPT timer. You can also request 1 AGT timer by calling setTimer(1);. More...
class  AudioTimerDriverSTM32
 STM32 Repeating Timer functions for repeated execution: Please use the typedef AudioTimer. By default the TIM1 is used. More...
class  AudioTimerDriverZephyr
 Repeating Timer driver for Zephyr using k_timer. More...
class  AudioWriter
 E.g. used by Encoders and Decoders. More...
class  BandPassFilter< T >
 Second-order band-pass filter (BiQuad DF2). Passes frequencies near the center frequency and attenuates those further away. The bandwidth is controlled by the Q factor: higher Q produces a narrower passband. Coefficients are derived from the Audio EQ Cookbook. More...
class  BandPassFilterDF1< T >
 Second-order band-pass filter (BiQuad DF1). Same coefficients as BandPassFilter; use this (not BandPassFilter) when T is a bounded fixed-point type like q1_14_t – see LowPassFilterDF1 for why. More...
class  BaseBuffer< T >
 Shared functionality of all buffers. More...
class  BaseConverter
 Abstract Base class for Converters A converter is processing the data in the indicated array. More...
class  BaseStream
 Base class for all Streams. It relies on write(const uint8_t *buffer, size_t size) and readBytes(uint8_t *buffer, size_t length). More...
class  Bin
 Provides reduced sampling rates through binning. More...
struct  Bin::BinState
struct  Bin::BinStateT< T >
class  BinT< T >
struct  BiQuadCoeffs
 Biquad coefficients, always computed in float regardless of the filter's sample type T. Intermediate values like the angular cutoff frequency w0 range up to PI (~3.14) at Nyquist, which overflows bounded fixed-point sample types like q1_14_t (range ~[-2,2)); only the final, range-safe coefficients (typically within [-2,2) for a stable filter) get cast into T when assigned to a BiQuadDF1/BiQuadDF2 instance. More...
class  BiQuadDF1< T >
 Second-order IIR filter in Direct Form I. Maintains separate input and output histories (x and y delay lines). Requires more memory than DF2 but is less susceptible to quantization issues with fixed-point arithmetic. More...
class  BiQuadDF2< T >
 Second-order IIR filter in Direct Form II. Uses a single delay line, requiring less memory than DF1. This is the base class for the ready-to-use filter types (LowPassFilter, HighPassFilter, BandPassFilter, NotchFilter, LowShelfFilter, HighShelfFilter) which compute their coefficients from frequency, sample rate and Q/gain parameters. More...
class  BufferedArray< T >
 Class which is usfull ot provide incremental data access e.g. for EdgeImpulse which request data with an offset and length starting from 0 up to the buffer length, restarting at 0 again. More...
class  BufferedStream
 The Arduino Stream supports operations on single characters. This is usually not the best way to push audio information, but we will support it anyway - by using a buffer. On reads: if the buffer is empty it gets refilled. More...
class  CallbackConverterT< T >
 You can provide a lambda expression to convert the data. More...
class  CallbackStream
 CallbackStream: A Stream that allows to register callback methods for accessing and providing and updating data. The callbacks can be lambda expressions. The update callback can also be used just to read the data without changing it. Warning: this class does not propagate audio info changes to the target stream. You need to do this manually. More...
class  CatStream
 Provides data from a concatenation of Streams. Please note that the provided Streams can be played only once! You will need to reset them (e.g. moving the file pointer to the beginning) and read them back if you want to process them a second time. The default timeout on the available() method is set to 0. This might be too small if you use e.g. a URLStream. If you set beginReset to true in the constructor, the system will automatically reset the streams when begin() is called. More...
class  ChannelAvg
 We average pairs of channels in a datastream. E.g. if we have 4 channels we end up with 2 channels. The channels will be (channel_1 + channel_2)/2 (channel_3 - channel_4)/2. This is equivalent of stereo to mono conversion but will also work for quadric, sexic or octic audio. This will not work if you provide single channel data! More...
class  ChannelAvgT< T, AvgT >
 We average pairs of channels in a datastream. E.g. if we have 4 channels we end up with 2 channels. The channels will be (channel_1 + channel_2)/2 (channel_3 - channel_4)/2. This is equivalent of stereo to mono conversion but will also work for quadric, sexic or octic audio. This will not work if you provide single channel data! More...
class  ChannelBinDiff
 Provides combination of binning and subtracting channels. More...
struct  ChannelBinDiff::ChannelBinDiffState
struct  ChannelBinDiff::ChannelBinDiffStateT< T >
class  ChannelBinDiffT< T >
 We first bin the channels then we calculate the difference between pairs of channels in a datastream. E.g. For binning, if we bin 4 samples in each channel we will have 4 times less samples per channel E.g. For subtracting if we have 4 channels we end up with 2 channels. The channels will be channel_1 - channel_2 channel_3 - channel_4 This is the same as combining binning and subtracting channels. This will not work if you provide single channel data! More...
class  ChannelConverter< T >
 Increasing or decreasing the number of channels. More...
class  ChannelDiff
class  ChannelDiffT< T >
 We calculate the difference between pairs of channels in a datastream. E.g. if we have 4 channels we end up with 2 channels. The channels will be channel_1 - channel_2 channel_3 - channel_4 This is similar to background subtraction between two channels but will also work for quadric, sexic or octic audio. This will not work if you provide single channel data! More...
class  ChannelEnhancer< T >
 Increases the channel count. More...
class  ChannelMixer< T, SumT >
 We mix all input channels in a datastream. E.g. if we have stereo input data we end up with 2 identical mono channels. More...
class  ChannelReducer
 We combine a datastream which consists of multiple channels into less channels. E.g. 2 to 1 The last target channel will contain the combined values of the exceeding source channels. More...
class  ChannelReducerT< T >
 We combine a datastream which consists of multiple channels into less channels. E.g. 2 to 1 The last target channel will contain the combined values of the exceeding source channels. More...
struct  ChannelSplitOutput::ChannelSelectionOutputDef
class  ChannelSplitOutput
 Simple functionality to extract mono streams from a multichannel (e.g. stereo) signal. More...
class  Client
class  CodecNOP
 Dummy no implmentation Codec. This is used so that we can initialize some pointers to decoders and encoders to make sure that they do not point to null. More...
class  ContainerDecoder
 Parent class for all container formats. More...
class  Converter1Channel< T >
 Converter for 1 Channel which applies the indicated Filter. More...
class  ConverterAutoCenter
 Makes sure that the avg of the signal is set to 0. More...
class  ConverterAutoCenterT< T >
 Makes sure that the avg of the signal is set to 0. More...
class  ConverterFillLeftAndRight< T >
 Make sure that both channels contain any data. We copy the data from the non-empty channel to the empty one. More...
class  ConverterInvert< T >
 Inverts the signal (multiplies every sample by -1). More...
class  ConverterNChannels< T, FT >
 Converter for n Channels which applies the indicated Filter. More...
class  ConverterScaler< T >
 Multiplies the values with the indicated factor adds the offset and clips at maxValue. To mute use a factor of 0.0! More...
class  ConverterStream< T >
 Both the data of the read or write operations will be converted with the help of the indicated converter. More...
class  ConverterSwitchLeftAndRight< T >
 Switches the left and right channel. More...
class  ConverterToInternalDACFormat< T >
 special case for internal DAC output for the ESP32. The incomming PCM buffer needs to be converted from signed 16bit to unsigned More...
class  CopyChannels< T, Cn, Cx, S >
 Copy channel Cx value of type T shifted by S bits to all Cn channels. More...
class  CsvOutput< T >
 Stream Wrapper which can be used to print the values as readable ASCII to the screen to be analyzed in the Serial Plotter The frames are separated by a new line. The channels in one frame are separated by a ,. More...
struct  DataNode
class  Decimate
 Provides a reduced sampling rate by taking a sample at every factor location (ingoring factor-1 samples). More...
struct  Decimate::DecimateState
struct  Decimate::DecimateStateT< T >
class  DecimateT< T >
 Provides reduced sampling rates. More...
class  DynamicMemoryStream
 MemoryStream which is written and read using the internal RAM. For each write the data is allocated on the heap. More...
class  FastIntSineGenerator< T >
 Sine wave generator that does not use any floating point operations in the readSample() hot path: it advances a 32 bit phase accumulator with an integer increment and looks up the result in a Q15 fixed point table. All floating point math (converting frequency/sample_rate into the phase increment) is done once in setFrequency()/setAudioInfo(), never per sample. This makes it a good fit for MCUs without a hardware FPU - e.g. the RP2040 - where sinf() is comparatively expensive. More...
class  FastSineGenerator< T >
 Sine wave which is based on a fast approximation function using floating point math. More...
class  Filter< T >
 Abstract filter interface definition. Subclasses implement process() to transform audio samples one at a time. Use reset() to clear internal state (e.g. delay lines) without changing the filter coefficients. More...
class  FilterChain< T, N >
 A cascade of N arbitrary filters applied in series. Each sample is passed through all filters in order. The caller owns the filter pointers and must ensure they outlive the chain. More...
class  FilteredStream< T, TF >
 Stream to which we can apply Filters for each channel. The filter might change the result size! More...
struct  FilterSampleConverter< T, FT >
 Converts a raw sample (type T) to/from a filter's arithmetic type (FT) for ConverterNChannels. The default just casts the raw sample straight through – this matches the traditional convention used here, where FT=float and filter coefficients are calibrated against the sample's raw magnitude (e.g. up to +-32767 for 16-bit audio), so no rescaling is wanted. Specialized below for FT=q1_14_t, whose bounded ~[-2,2) range means a plain (q1_14_t)sample cast would misinterpret the raw PCM magnitude as a literal Q1.14 value and saturate almost immediately; q1_14_t::fromIntNN()/toIntNN() do the correct bit-shift scaling instead. More...
struct  FilterSampleConverter< int16_t, q1_14_t >
struct  FilterSampleConverter< int24_t, q1_14_t >
struct  FilterSampleConverter< int32_t, q1_14_t >
class  FIR< T >
 Finite Impulse Response (FIR) filter. Performs convolution of the input signal with a set of feedforward coefficients b[]. For integer types, an optional scaling factor is applied to preserve precision. You can use https://www.arc.id.au/FilterDesign.html to design the coefficients. More...
class  FloatSineGenerator< T >
 Generates a Sound with the help of sin() function. If performance is of concern, I suggest to use theSineFromTable, the FastSineGenerator or the FastIntSineGenerator. More...
class  FrameBuffer< T >
 A FrameBuffer reads multiple values for array of 2 dimensional frames. More...
class  GeneratedSoundStream< T >
 Source for reading generated tones. Please note. More...
class  GeneratorFixedValue< T >
 Just returns a constant value. More...
class  GeneratorFromArray< T >
 We generate the samples from an array which is provided in the constructor. More...
class  GeneratorFromStream< T >
 An Adapter Class which lets you use any Stream as a Generator. More...
class  GeneratorMixer< T >
 Generator which combines (mixes) multiple sound generators into one output. More...
class  GeneratorQueue< T >
 Queues SoundGenerators and plays them sequentially. Queued SoundGenerators must be limited (eg: setPlayTime()) or no later Generator will ever be played. More...
class  HardwareSerial
class  HexDumpOutput
 Creates a Hex Dump. More...
class  HighPassFilter< T >
 Second-order high-pass filter (BiQuad DF2). Attenuates frequencies below the cutoff frequency. Coefficients are derived from the Audio EQ Cookbook. More...
class  HighPassFilterDF1< T >
 Second-order high-pass filter (BiQuad DF1). Same coefficients as HighPassFilter; use this (not HighPassFilter) when T is a bounded fixed-point type like q1_14_t – see LowPassFilterDF1 for why. More...
class  HighShelfFilter< T >
 Second-order high-shelf filter (BiQuad DF2). Boosts or cuts frequencies above the shelf frequency by the specified gain (in dB) while leaving lower frequencies unchanged. Commonly used in tone controls and equalization. Coefficients are derived from the Audio EQ Cookbook. More...
class  HighShelfFilterDF1< T >
 Second-order high-shelf filter (BiQuad DF1). Same coefficients as HighShelfFilter. NOTE: unlike the other DF1 filters here, this is NOT a working fix for q1_14_t (or similar bounded fixed-point types) – see the. More...
class  IIR< T >
 Infinite Impulse Response (IIR) filter. Uses both feedforward (b[]) and feedback (a[]) coefficients. The a[0] coefficient is used to normalize all other coefficients. For integer types, an optional scaling factor is applied to preserve precision. More...
class  InputMerge< T >
 Merges multiple input streams. So if you provide 2 mono channels you get a stereo signal as result with the left channel from channel 0 and the right from channel 1. More...
class  InputMixer< T, SumT >
 MixerStream is mixing the input from Multiple Input Streams. All streams must have the same audo format (sample rate, channels, bits per sample). More...
class  int24_3bytes_t
 24bit integer which is used for I2S sound processing. The values are really using 3 bytes. It works only on little endian machines! More...
class  int24_4bytes_t
 24bit integer which is used for I2S sound processing. The values are represented as int32_t, but only 3 bytes are used. If you assign values which are too big, they are clipped. More...
class  List< T >::Iterator
class  Vector< T >::iterator
 Iterator for the Vector class. More...
class  List< T >
 Double linked list. More...
class  LowPassFilter< T >
 Second-order low-pass filter (BiQuad DF2). Attenuates frequencies above the cutoff frequency. Coefficients are derived from the Audio EQ Cookbook. More...
class  LowPassFilterDF1< T >
 Second-order low-pass filter (BiQuad DF1). Same coefficients as LowPassFilter, but built on BiQuadDF1, whose separate x[]/y[] delay lines stay bounded to the actual signal range – unlike DF2's single delay line, which can need far more dynamic range than the signal for low cutoff/ sampleRate ratios. Use this (not LowPassFilter) when T is a bounded fixed-point type like q1_14_t. More...
class  LowShelfFilter< T >
 Second-order low-shelf filter (BiQuad DF2). Boosts or cuts frequencies below the shelf frequency by the specified gain (in dB) while leaving higher frequencies unchanged. Commonly used in tone controls and equalization. Coefficients are derived from the Audio EQ Cookbook. More...
class  LowShelfFilterDF1< T >
 Second-order low-shelf filter (BiQuad DF1). Same coefficients as LowShelfFilter. NOTE: switching to DF1 does NOT make this reliable for bounded fixed-point types like q1_14_t – shelf coefficients scale with the linear gain factor and can exceed the type's range even at modest gain settings; this is a coefficient headroom problem, not the DF2 state-headroom problem DF1 fixes elsewhere. Watch for the LOGE warning from checkCoeffRange() in begin(). More...
class  MemoryOutput
 Writes to a preallocated memory. More...
class  MemoryStream
 A simple Stream implementation which is backed by allocated memory. More...
struct  InputMerge< T >::MergeRecord
class  MimeSource
 Abstract interface for classes that can provide MIME type information. More...
struct  MixGain< T >
 Mixing of multiple audio input streams into a single output stream. More...
class  ModifyingOutput
 Abstract class: Objects can be put into a pipleline. More...
class  ModifyingStream
 Abstract class: Objects can be put into a pipleline. More...
class  MultiConverter< T >
 Combines multiple converters. More...
class  NBuffer< T >
 A N buffer. If count=2 we create a DoubleBuffer, if count=3 a TripleBuffer etc. More...
class  NBufferExt< T >
 A NBufferExt is a subclass of NBuffer which allows to use a direct access API to the BaseBuffer. More...
class  NBufferFile< File, T >
 A File backed buffer which uses the provided files for buffering with the indicated max size. A file is made available for reading as soon as it reached the size limit. You must provide the files opened in "Write" mode with the addFile() method! More...
struct  List< T >::Node
class  NoFilter< T >
 Passes the input through unchanged. Useful as a placeholder when a Filter is required but no processing is desired. More...
class  NOPConverter
 Dummy converter which does nothing. More...
class  NotchFilter< T >
 Second-order notch (band-reject) filter (BiQuad DF2). Rejects frequencies near the center frequency and passes those further away. Useful for removing a specific unwanted frequency (e.g. mains hum at 50/60 Hz). Coefficients are derived from the Audio EQ Cookbook. More...
class  NotchFilterDF1< T >
 Second-order notch (band-reject) filter (BiQuad DF1). Same coefficients as NotchFilter; use this (not NotchFilter) when T is a bounded fixed-point type like q1_14_t – see LowPassFilterDF1 for why. More...
class  NullStream
 The Arduino Stream which provides silence and simulates a null device when used as audio target or audio source. More...
class  NumberConverter
 Converts from a source to a target number with a different type. More...
class  NumberReader
 Reads n numbers from an Arduino Stream. More...
class  numeric_limits< audio_tools::int24_3bytes_t >
class  numeric_limits< audio_tools::int24_4bytes_t >
struct  RingBufferFile< File, T >::OffsetInfo
class  OpusOggDecoder
 Opus Decoder which uses the Ogg Container. See https://datatracker.ietf.org/doc/html/rfc7845. The audio data is transmitted in frames and the header information contains the sampler rate, channels and other critical info. Dependency: https://github.com/pschatzmann/codec-opus. More...
class  OpusOggEncoder
 Opus Encoder which uses the Ogg Container: see https://datatracker.ietf.org/doc/html/rfc7845 Dependency: https://github.com/pschatzmann/codec-opus. More...
class  OpusOggWriter
class  OutputMixer< T >
class  PinkNoiseGenerator< T >
 Generates pink noise. More...
class  PoppingSoundRemover< T >
 Big value gaps (at the beginning and the end of a recording) can lead to some popping sounds. We will try to set the values to 0 until the first transition thru 0 of the audio curve. More...
class  Print
class  PriorityQueue< T >
 Priority Queue which is based on a List. The order of the elements is defined by a compare function which is provided in the constructor. If the function returns > 0 if v1 > v2, the data will be provided in increasing order. More...
class  ProgressStream
 Generic calss to measure the the total bytes which were processed in order to calculate the progress as a percentage of the total size. More...
class  ProgressStreamInfo
 Configuration for ProgressStream. More...
class  q1_14_t
 Fixed-point Q1.14 number: a plain 16-bit signed integer holding 1 integer bit and 14 fractional bits (value = raw / 16384.0). Covers the range [-2.0, 1.99993896484375] with a resolution of ~6.1e-5, using only integer add/sub/mul/div – no hardware floating-point instructions. More...
struct  GeneratorQueue< T >::QNode
class  Queue< T >
 FIFO Queue which is based on a List. More...
class  QueueFromVector< T >
 FIFO Queue which is based on a Vector. More...
class  QueueStream< T >
 Stream class which stores the data in a temporary queue buffer. The queue can be consumed e.g. by a callback function by calling readBytes();. More...
class  RingBuffer< T >
 Implements a typed Ringbuffer. More...
class  RingBufferFile< File, T >
 An File backed Ring Buffer that we can use to receive streaming audio. We expect an open file as parameter. More...
class  RingBufferSPSC< T >
 Lock-free Single-Producer Single-Consumer ring buffer. More...
class  RingBufferStream
 An AudioStream backed by a Ringbuffer. We can write to the end and read from the beginning of the stream. More...
class  RTSPFormat
 Audio Format Definition - Base class for RTSP audio formats. More...
class  RTSPFormatAAC
 AAC format for RTSP https://en.wikipedia.org/wiki/RTP_payload_formats See RFC 3640 for details. More...
class  RTSPFormatAbtX
 abtX format for RTSP https://en.wikipedia.org/wiki/RTP_payload_formats More...
class  RTSPFormatADPCM< AudioEncoder >
 RTSP/RTP formatter for mono IMA ADPCM (DVI4). More...
class  RTSPFormatG711
 G711 μ-Law format for RTSP https://en.wikipedia.org/wiki/RTP_payload_formats Packet intervall: 20, frame size: any. More...
class  RTSPFormatGSM
 GSM format for RTSP https://en.wikipedia.org/wiki/RTP_payload_formats. More...
class  RTSPFormatH264
 H.264 (AVC) format for RTSP video streaming, per RFC 6184. More...
class  RTSPFormatMJPEG
 MJPEG (Motion JPEG) format for RTSP video streaming. More...
class  RTSPFormatMP3
 MP3 format for RTSP https://en.wikipedia.org/wiki/RTP_payload_formats. More...
class  RTSPFormatMTS
 MPEG-2 Transport Stream (MP2T) format for RTSP streaming of a pre-muxed audio+video container, per RFC 2250. More...
class  RTSPFormatOpus
 Opus format for RTSP https://en.wikipedia.org/wiki/RTP_payload_formats. More...
class  RTSPFormatPCM
 Linear PCM Format for RTSP Streaming. More...
class  RTSPFormatPCM8
 L8 format for RTSP https://en.wikipedia.org/wiki/RTP_payload_formats. More...
class  RTSPPlatform< TcpServer, TcpClient, UdpSocket >
 Template-based platform abstraction for RTSP networking. More...
struct  RTSPVideoInfo
 Video Information Structure. More...
class  RTSPVideoInfoSupport
 Base class for video information support. More...
class  SawToothGenerator< T >
 Generates a saw tooth wave sound. Uses a 32 bit phase accumulator with an integer increment, just like FastIntSineGenerator: no floating point operations or divisions in the readSample() hot path. Unlike a sine, a saw tooth needs no lookup table either - a wrapping unsigned accumulator reinterpreted as signed already is a linear ramp - so this is even cheaper than FastIntSineGenerator and a good fit for MCUs without a hardware FPU (e.g. RP2040), where the previous sinf()/float based implementation (inherited from SineGenerator) was comparatively expensive. More...
class  SilenceGenerator< T >
 Provides a fixed value (e.g. 0) as sound data. This can be used e.g. to test the output functionality which should optimally just output silence and no artifacts. More...
class  SilenceRemovalConverter< T >
 Removes any silence from the buffer that is longer then n samples with a amplitude below the indicated threshhold. If you process multiple channels you need to multiply the channels with the number of samples to indicate n. More...
class  SineFromTable< T >
 A sine generator based on a table. The table is created using degrees where one full wave is 360 degrees. More...
class  SingleBuffer< T >
 A simple Buffer implementation which just uses a (dynamically sized) array. More...
class  Slice< T >
 Helps to split up a big memory array into smaller slices. There are no additinal heap allocations! Example: if we have an array with 9 entries (1,2,3,4,5,6,7,8,9): slices(5) gives 2. slice(5,0) returns size 5 with 1,2,3,4,5 and slice(5,1) returns size 4 with 6,7,8,9! More...
class  SmoothTransition< T >
 Changes the samples at the beginning or at the end to slowly ramp up the volume. More...
class  soft_float_t
 Software "pseudo-float": a real number represented as a signed 16-bit mantissa plus a 16-bit exponent (value = mantissa * 2^exponent), computed with integer multiply/shift/compare only – no hardware floating-point instructions. This generalizes speexdsp's classic fixed-point trick of tracking a handful of wide-dynamic-range control variables as a normalized mantissa+exponent pair into a full, operator-overloaded numeric type usable as a drop-in replacement for float (see MDFFixedPoint in MDFEchoCancellation.h, which uses this class as the element type for the MDF echo canceller's sample/spectrum arrays and internal state, so the whole algorithm runs without native float arithmetic). More...
class  SOSFilter< T, N >
 Second Order Sections (SOS) filter — a cascade of N BiQuad DF2 stages. Higher-order filters should be decomposed into second-order sections to avoid numerical instability. Each section has its own b[3]/a[3] coefficients and optional gain. Tools like scipy.signal.butter(..., output='sos') or MATLAB's tf2sos produce the required coefficient arrays. More...
class  SoundGenerator< T >
 Base class to define the abstract interface for the sound generating classes. More...
class  SquareWaveGenerator< T >
 Generates a square wave sound. Uses the same 32 bit phase accumulator as SawToothGenerator/FastIntSineGenerator: no floating point operations or sin() calls in the readSample() hot path. A square wave needs neither a sine approximation nor a lookup table - just the sign bit of the ramp - so readSample() is a single comparison, making this a good fit for MCUs without a hardware FPU (e.g. RP2040), where the previous FastSineGenerator based implementation still did a float polynomial evaluation per sample just to keep its sign. More...
class  Stack< T >
 LIFO Stack which is based on a List. More...
class  Str
 Str which keeps the data on the heap. We grow the allocated memory only if the copy source is not fitting. More...
class  Stream
class  StrView
 A simple wrapper to provide string functions on existing allocated char*. If the underlying char* is a const we do not allow any updates; The ownership of the char* must be managed externally! More...
class  TestGenerator< T >
 Generates a test signal which is easy to check because the values are incremented or decremented by 1. More...
class  Throttle
 Throttle the sending or receiving of the audio data to limit it to the indicated sample rate. More...
struct  ThrottleConfig
 Configure Throttle setting. More...
class  TimerCallback
 Internal class to manage the different timer callbacks for the 4 hardware timers. More...
class  TimerCallbackAudioStream
 Callback driven Audio Source (rx_tx_mode==RX_MODE) or Audio Sink (rx_tx_mode==TX_MODE). This class allows to to integrate external libraries in order to consume or generate a data stream which is based on a timer. More...
struct  TimerCallbackAudioStreamInfo
 TimerCallbackAudioStream Configuration. More...
class  TimeSource
 Interface for classes that can provide time information - two distinct notions of "now", not interchangeable: millis() is real wall time; playbackTime() is however far actual processing has gotten, which is not the same thing whenever the two can diverge (a consumer blocked/starved, a paused source, ...). A consumer that must stay tied to genuine progress (e.g. PacedVideoOutput scheduling video against actual decoded-audio playback, not merely time passing) should use playbackTime(), not millis(). More...
class  UserCallback
 Internal class to manage User callbacks. An optinal parameter can be passed to the callback method We support 4 timers. More...
class  Vector< T >
 Vector implementation which provides the most important methods as defined by std::vector. This class it is quite handy to have and most of the times quite better then dealing with raw c arrays. More...
class  VolumeMeter
 A simple class to determine the volume. You can use it as final output or as output or input in your audio chain. More...
class  VolumeSupport
 Supports the setting and getting of the volume. More...
class  WhiteNoiseGenerator< T >
 Generates a random noise sound with the help of rand() function. More...

Namespaces

namespace  audio_tools
 Generic Implementation of sound input and output for desktop environments using portaudio.
namespace  audio_tools::audio_tools
 AutioTools Configuration.
namespace  audio_tools::std

Macros

#define A2DP_BUFFER_COUNT   30
#define A2DP_BUFFER_SIZE   512
#define ANALOG_BUFFER_COUNT   6
#define ANALOG_BUFFER_SIZE   512
#define ANALOG_BUFFER_SIZE   512
#define ANALOG_BUFFERS   50
#define ANALOG_BUFFERS   5
#define ANALOG_MAX_OUT_CHANNELS   1
#define ANALOG_MAX_SAMPLE_RATE   16000
#define ARDUINO
#define assert(T)
#define AUDIO_INCLUDE_CORE   true
#define AUDIOTOOLS_MAJOR_VERSION   1
#define AUDIOTOOLS_METADATA_ICY_ASCII_ONLY   true
#define AUDIOTOOLS_METADATA_ICY_LIMIT   400
#define AUDIOTOOLS_MINOR_VERSION   2
#define AUDIOTOOLS_VERSION   "1.2.4"
#define CHECK_MEMORY()
#define CODEC_DELAY_MS   10
#define COPY_DELAY_ON_NODATA   10
#define COPY_RETRY_LIMIT   20
#define DEFAULT_BITS_PER_SAMPLE   16
#define DEFAULT_BUFFER_SIZE   125
#define DEFAULT_BUFFER_SIZE   1024
#define DEFAULT_CHANNELS   2
#define DEFAULT_PCM_FRAGMENT_SIZE   640
#define DEFAULT_SAMPLE_RATE   44100
#define DESKTOP_MILLIS_DEFINED
#define df2str(s)
#define df2xstr(s)
#define ESP_ARDUINO_VERSION_STR   df2str(ESP_ARDUINO_VERSION_MAJOR) "." df2str(ESP_ARDUINO_VERSION_MINOR) "." df2str(ESP_ARDUINO_VERSION_PATCH)
#define ESP_IDF_VERSION_VAL(a, b, c)
#define EXIT_ON_STOP
#define FIX_SYNC_SYNCHRONIZE
#define GPIO_NONE   -1
#define GPIO_TO_INT(pin)
#define GPIO_TO_INT(pin)
#define GPIO_TO_STR(pin)
#define GPIO_TO_STR(pin)
#define HIGH   0x1
#define HTTP_CHUNKED_SIZE_MAX_LEN   80
#define HTTP_MAX_LEN   1024
#define I2S_BUFFER_COUNT   6
#define I2S_BUFFER_SIZE   512
#define I2S_DEFAULT_PORT   0
#define I2S_USE_APLL   false
#define I2S_USE_APLL   false
#define INPUT   0x0
#define INPUT_PULLUP   0x2
#define INT24_MAX   0x7FFFFF
#define INT24_MAX   0x7FFFFF
#define IRAM_ATTR
#define IS_GPIO(pin)
#define IS_GPIO(pin)
#define IS_NOARDUINO
#define IS_RENESAS   1
#define LOG_LEVEL   AudioLogger::Warning
#define LOG_METHOD   __PRETTY_FUNCTION__
#define LOG_PRINTF_BUFFER_SIZE   60
#define LOG_PRINTF_BUFFER_SIZE   303
#define LOG_STREAM   Serial
#define LOGD(...)
#define LOGE(...)
#define LOGI(...)
#define LOGW(...)
#define LOW   0x0
#define MAX_SINGLE_CHARS   8
#define NO_INPLACE_INIT_SUPPORT
#define NO_INPLACE_INIT_SUPPORT
#define NO_TRACE
#define NO_TRACED
#define NO_TRACEE
#define NO_TRACEI
#define OUTPUT   0x1
#define PI   3.14159265359f
#define PIN_ANALOG_START   26
#define PIN_ANALOG_START   PA0
#define PIN_ANALOG_START   A0
#define PIN_CS   SS
#define PIN_CS   SS
#define PIN_CS   1
#define PIN_CS   4
#define PIN_CS   -1
#define PIN_CS   9
#define PIN_I2S_BCK   13
#define PIN_I2S_BCK   -1
#define PIN_I2S_BCK   26
#define PIN_I2S_BCK   1
#define PIN_I2S_BCK   -1
#define PIN_I2S_DATA_IN   12
#define PIN_I2S_DATA_IN   -1
#define PIN_I2S_DATA_IN   28
#define PIN_I2S_DATA_IN   3
#define PIN_I2S_DATA_IN   -1
#define PIN_I2S_DATA_OUT   11
#define PIN_I2S_DATA_OUT   -1
#define PIN_I2S_DATA_OUT   28
#define PIN_I2S_DATA_OUT   3
#define PIN_I2S_DATA_OUT   -1
#define PIN_I2S_MUTE   -1
#define PIN_I2S_MUTE   23
#define PIN_I2S_MUTE   -1
#define PIN_I2S_MUTE   -1
#define PIN_I2S_MUTE   -1
#define PIN_I2S_WS   10
#define PIN_I2S_WS   -1
#define PIN_I2S_WS   PIN_I2S_BCK+1
#define PIN_I2S_WS   PIN_I2S_BCK+1
#define PIN_I2S_WS   -1
#define PIN_PWM_COUNT   12
#define PIN_PWM_START   6
#define PIN_PWM_START   12
#define PIN_PWM_START   6
#define PIN_PWM_START   PA0
#define PIN_PWM_START   D2
#define PREFER_FIXEDPOINT   false
#define PRINT_FLUSH_OVERRIDE
#define PSTR(fmt)
#define PWM_AUDIO_FREQUENCY   30000
#define PWM_BUFFER_COUNT   4
#define PWM_BUFFER_SIZE   125
#define PWM_BUFFER_SIZE   1024
#define PWM_DEFAULT_TIMER   TIM2
#define PWM_FREQ_TIMER_NO   3
#define PWM_MAX_SAMPLE_RATE   8000
#define RP2040_MBED
#define SOFT_MUTE_VALUE   0
#define SOFT_MUTE_VALUE   0
#define SOFT_MUTE_VALUE   0
#define SOFT_MUTE_VALUE   0
#define STREAM_READ_OVERRIDE
#define STREAM_READCHAR_OVERRIDE
#define STREAM_WRITE_OVERRIDE
#define TRACED()
#define TRACEE()
#define TRACEI()
#define TRACEW()
#define URL_CLIENT_TIMEOUT   60000
#define URL_CLIENT_TIMEOUT   60000;
#define URL_HANDSHAKE_TIMEOUT   120000
#define USE_ALLOCATOR   false
#define USE_ANALOG
#define USE_ANALOG
#define USE_ANALOG_ARDUINO
#define USE_ANALOG_ARDUINO
#define USE_ANALOG_ARDUINO
#define USE_AUDIO_LOGGING   true
#define USE_AUDIO_SERVER
#define USE_AUDIO_SERVER
#define USE_AUDIOTOOLS_NS   true
#define USE_CHECK_MEMORY   false
#define USE_CONCURRENCY
#define USE_CPP_TASK
#define USE_ESP32_LOGGER   false
#define USE_ETHERNET
#define USE_ETHERNET
#define USE_I2S
#define USE_I2S
#define USE_I2S
#define USE_INT24_FROM_INT
#define USE_INT24_FROM_INT
#define USE_INT24_FROM_INT
#define USE_INT24_FROM_INT
#define USE_LEGACY_I2S   (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0))
#define USE_OBSOLETE   false
#define USE_OPENCV
#define USE_PRINT_FLUSH   true
#define USE_PSRAM
#define USE_PWM
#define USE_PWM
#define USE_PWM
#define USE_PWM
#define USE_RESAMPLE_BUFFER   true
#define USE_SD_NO_NS
#define USE_SD_NO_NS
#define USE_SD_NO_NS
#define USE_SD_NO_NS
#define USE_SD_NO_NS
#define USE_SD_SUPPORTS_SPI
#define USE_SD_SUPPORTS_SPI
#define USE_SERVER_ACCEPT   true
#define USE_SERVER_ACCEPT   1
#define USE_STD_CONCURRENCY
#define USE_STRTOD
#define USE_TASK   false
#define USE_TIMER
#define USE_TIMER
#define USE_TIMER
#define USE_TIMER
#define USE_TIMER
#define USE_TIMER
#define USE_TYPETRAITS
#define USE_TYPETRAITS
#define USE_TYPETRAITS
#define USE_URL_ARDUINO
#define USE_URL_ARDUINO
#define USE_URL_ARDUINO
#define USE_URL_ARDUINO
#define USE_WIFI
#define USE_WIFI
#define VS1053_CS   6
#define VS1053_CS_SD   9
#define VS1053_DCS   7
#define VS1053_DEFAULT_VOLUME   0.7
#define VS1053_DEFINED
#define VS1053_DREQ   2
#define VS1053_EXT   1
#define VS1053_RESET   8
#define ZLOGE(...)

Typedefs

using ActivityCallback = void (*)(bool isActive)
 Callback function type for activity state changes.
using AudioTimerDriver = AudioTimerDriverAVR
 use AudioTimer!
using CallbackConverter = CallbackConverterT<int16_t>
 CallbackConverter with int16_t as default type.
using digital_pin_t = gpio_dt_spec
 Zephyr GPIO spec as digital_pin_t.
using int24_t = int24_4bytes_t
typedef void(* my_repeating_timer_callback_t) (void *obj)
using Pins = Vector<int>
 Type alias for a collection of pin numbers.
using PseudoFloat = soft_float_t
typedef void(* repeating_timer_callback_t) (void *obj)
using sample_rate_t = uint32_t
 Type alias for sample rate values.
template<class T = int16_t>
using SineGenerator = FloatSineGenerator<T>
template<class T = int16_t>
using SineWaveGenerator = SineGenerator<T>
 Alias for SineGenerator.
using TAllocatorExt = AllocatorZephyr
using TAllocatorSTD = AllocatorZephyr
using TimerAlarmRepeating = AudioTimer
using VolumeOutput = VolumeMeter
 Legacy alias for VolumeMeter.
using VolumePrint = VolumeMeter
 Legacy alias for VolumeMeter.
using WiFiClientSecure = WiFiClientSecureZephyr

Enumerations

enum class  AudioFormat : uint16_t {
  UNKNOWN = 0x0000 , PCM = 0x0001 , ADPCM = 0x0002 , IEEE_FLOAT = 0x0003 ,
  ALAW = 0x0006 , MULAW = 0x0007 , OKI_ADPCM = 0x0010 , DVI_ADPCM = 0x0011 ,
  IMA_ADPCM = DVI_ADPCM , MEDIASPACE_ADPCM = 0x0012 , SIERRA_ADPCM = 0x0013 , G723_ADPCM = 0x0014 ,
  DIALOGIC_OKI_ADPCM = 0x0017 , MEDIAVISION_ADPCM = 0x0018 , YAMAHA_ADPCM = 0x0020 , ANTEX_ADPCME = 0x0033 ,
  DIGIADPCM = 0x0036 , NMS_VBXADPCM = 0x0038 , CS_IMAADPCM = 0x0039 , ROCKWELL_ADPCM = 0x003B ,
  G721_ADPCM = 0x0040 , G726_ADPCM = 0x0064 , G722_ADPCM = 0x0065 , INFOCOM_ITS_G721_ADPCM = 0x008B ,
  AC3 = 0x0092 , ZYXEL_ADPCM = 0x0097 , RHETOREX_ADPCM = 0x0100 , SANYO_LD_ADPCM = 0x0125 ,
  G726ADPCM = 0x0140 , UNISYS_NAP_ADPCM = 0x0170 , MP3 = 0x0055 , ALAC = 0x6C61 ,
  AAC = 0xA106 , UNKNOWN = 0x0000 , PCM = 0x0001 , ADPCM = 0x0002 ,
  IEEE_FLOAT = 0x0003 , ALAW = 0x0006 , MULAW = 0x0007 , OKI_ADPCM = 0x0010 ,
  DVI_ADPCM = 0x0011 , IMA_ADPCM = DVI_ADPCM , MEDIASPACE_ADPCM = 0x0012 , SIERRA_ADPCM = 0x0013 ,
  G723_ADPCM = 0x0014 , DIALOGIC_OKI_ADPCM = 0x0017 , MEDIAVISION_ADPCM = 0x0018 , YAMAHA_ADPCM = 0x0020 ,
  ANTEX_ADPCME = 0x0033 , DIGIADPCM = 0x0036 , NMS_VBXADPCM = 0x0038 , CS_IMAADPCM = 0x0039 ,
  ROCKWELL_ADPCM = 0x003B , G721_ADPCM = 0x0040 , G726_ADPCM = 0x0064 , G722_ADPCM = 0x0065 ,
  INFOCOM_ITS_G721_ADPCM = 0x008B , AC3 = 0x0092 , ZYXEL_ADPCM = 0x0097 , RHETOREX_ADPCM = 0x0100 ,
  SANYO_LD_ADPCM = 0x0125 , G726ADPCM = 0x0140 , UNISYS_NAP_ADPCM = 0x0170 , MP3 = 0x0055 ,
  ALAC = 0x6C61 , AAC = 0xA106
}
 Audio format codes used by Microsoft e.g. in avi or wav files. More...
enum  FillLeftAndRightStatus {
  Auto , LeftIsEmpty , RightIsEmpty , Auto ,
  LeftIsEmpty , RightIsEmpty
}
 Configure ConverterFillLeftAndRight. More...
enum  I2SFormat {
  I2S_STD_FORMAT , I2S_LSB_FORMAT , I2S_MSB_FORMAT , I2S_PHILIPS_FORMAT ,
  I2S_RIGHT_JUSTIFIED_FORMAT , I2S_LEFT_JUSTIFIED_FORMAT , I2S_PCM , I2S_STD_FORMAT ,
  I2S_LSB_FORMAT , I2S_MSB_FORMAT , I2S_PHILIPS_FORMAT , I2S_RIGHT_JUSTIFIED_FORMAT ,
  I2S_LEFT_JUSTIFIED_FORMAT , I2S_PCM
}
 I2S Formats. More...
enum  I2SSignalType {
  Digital , Analog , PDM , TDM ,
  Digital , Analog , PDM , TDM
}
 I2S Signal Types: Digital, Analog, PDM. More...
enum  MediaType { MEDIA_AUDIO , MEDIA_VIDEO }
 Media type enumeration for RTSP streams. More...
enum  MemoryType {
  RAM , PS_RAM , FLASH_RAM , RAM ,
  PS_RAM , FLASH_RAM
}
 Memory types. More...
enum  PrintCharFmt { DEC = 10 , HEX = 16 , DEC = 10 , HEX = 16 }
enum class  RTSPVideoFormat {
  RGB24 , RGB565 , YUV420 , JPEG ,
  MJPEG , GRAYSCALE , H264
}
 Video format enumeration for different pixel formats. More...
enum  RxTxMode {
  UNDEFINED_MODE = 0 , TX_MODE = 1 , RX_MODE = 2 , RXTX_MODE = 3 ,
  UNDEFINED_MODE = 0 , TX_MODE = 1 , RX_MODE = 2 , RXTX_MODE = 3
}
 The Microcontroller is the Audio Source (TX_MODE) or Audio Sink (RX_MODE). RXTX_MODE is Source and Sink at the same time! More...
enum  TimerFunction {
  DirectTimerCallback , TimerCallbackInThread , SimpleThreadLoop , DirectTimerCallback ,
  TimerCallbackInThread , SimpleThreadLoop
}
enum  TimeUnit {
  MS , US , HZ , MS ,
  US , HZ
}
 Time Units. More...

Functions

struct __attribute__ ((packed)) DSDPrefix
 DSF file prefix containing file identification and basic information.
BiQuadCoeffs calculateBandPassCoeffs (float frequency, float sampleRate, float q)
 Computes the b0/b1/b2/a1/a2 biquad coefficients for a band-pass filter.
BiQuadCoeffs calculateHighPassCoeffs (float frequency, float sampleRate, float q)
 Computes the b0/b1/b2/a1/a2 biquad coefficients for a high-pass filter.
BiQuadCoeffs calculateHighShelfCoeffs (float frequency, float sampleRate, float gain, float slope)
 Computes the b0/b1/b2/a1/a2 biquad coefficients for a high-shelf filter.
BiQuadCoeffs calculateLowPassCoeffs (float frequency, float sampleRate, float q)
 Computes the b0/b1/b2/a1/a2 biquad coefficients for a low-pass filter.
BiQuadCoeffs calculateLowShelfCoeffs (float frequency, float sampleRate, float gain, float slope)
 Computes the b0/b1/b2/a1/a2 biquad coefficients for a low-shelf filter.
BiQuadCoeffs calculateNotchCoeffs (float frequency, float sampleRate, float q)
template<typename T>
void checkCoeffRange (const BiQuadCoeffs &c)
 Warns (once per call, via LOGE) about any coefficient that doesn't survive being stored in T. This is expected/harmless for float or double (T can represent the value, roundtrip is exact); it's a real problem for a bounded fixed-point type like q1_14_t (range ~[-2,2)), where a coefficient outside that range silently saturates instead of erroring, quietly producing a wrong filter – e.g. shelf filters, whose coefficients scale with the linear gain factor and can exceed +-2 even at modest gains (a limitation of q1_14_t's 1-bit-of-headroom range, not of DF1 vs DF2; see LowShelfFilterDF1/HighShelfFilterDF1).
static void checkMemory (bool printMemory=false)
 Executes heap_caps_check_integrity_all().
void delay (uint32_t ms)
void delayMicroseconds (uint32_t us)
int digitalRead (digital_pin_t pin)
void digitalWrite (digital_pin_t pin, bool value)
AudioFormat fromMime (const char *mime)
 Best-effort inverse of toMime(): maps a mime type (e.g. an AudioEncoder's mime()) back to the AudioFormat wav code it came from - AudioFormat::UNKNOWN if mime is null or doesn't match any of toMime()'s mappings (most codecs - Opus, FLAC, GSM, ... - have no wav code at all, so this can never be exhaustive; "audio/wav" itself maps back to PCM specifically, even though toMime() also uses it for every ADPCM variant, since PCM is the common case).
bool isWavFormat (AudioFormat format)
 True if the wav code is handled via the WAV decoder (i.e. toMime() maps it to "audio/wav": PCM and all ADPCM variants).
long map (long x, long in_min, long in_max, long out_min, long out_max)
 Maps input to output values.
template<typename T>
T mapT (T x, T in_min, T in_max, T out_min, T out_max)
 Similar to Arduino map function but using floats.
uint64_t micros ()
uint32_t millis ()
 Returns the milliseconds since the start.
static bool operator!= (audio_tools::digital_pin_t &a, audio_tools::digital_pin_t &b)
 Support for pin compare.
bool operator!= (double a, soft_float_t b)
bool operator!= (float a, q1_14_t b)
bool operator!= (float a, soft_float_t b)
bool operator!= (int a, soft_float_t b)
soft_float_t operator* (double a, soft_float_t b)
q1_14_t operator* (float a, q1_14_t b)
soft_float_t operator* (float a, soft_float_t b)
soft_float_t operator* (int a, soft_float_t b)
soft_float_t operator+ (double a, soft_float_t b)
q1_14_t operator+ (float a, q1_14_t b)
soft_float_t operator+ (float a, soft_float_t b)
soft_float_t operator+ (int a, soft_float_t b)
soft_float_t operator- (double a, soft_float_t b)
q1_14_t operator- (float a, q1_14_t b)
soft_float_t operator- (float a, soft_float_t b)
soft_float_t operator- (int a, soft_float_t b)
soft_float_t operator/ (double a, soft_float_t b)
q1_14_t operator/ (float a, q1_14_t b)
soft_float_t operator/ (float a, soft_float_t b)
soft_float_t operator/ (int a, soft_float_t b)
bool operator< (double a, soft_float_t b)
bool operator< (float a, q1_14_t b)
bool operator< (float a, soft_float_t b)
bool operator< (int a, soft_float_t b)
bool operator<= (double a, soft_float_t b)
bool operator<= (float a, q1_14_t b)
bool operator<= (float a, soft_float_t b)
bool operator<= (int a, soft_float_t b)
static bool operator== (audio_tools::digital_pin_t &a, audio_tools::digital_pin_t &b)
 Support for pin compare.
bool operator== (double a, soft_float_t b)
bool operator== (float a, q1_14_t b)
bool operator== (float a, soft_float_t b)
bool operator== (int a, soft_float_t b)
bool operator> (double a, soft_float_t b)
bool operator> (float a, q1_14_t b)
bool operator> (float a, soft_float_t b)
bool operator> (int a, soft_float_t b)
bool operator>= (double a, soft_float_t b)
bool operator>= (float a, q1_14_t b)
bool operator>= (float a, soft_float_t b)
bool operator>= (int a, soft_float_t b)
void pinMode (digital_pin_t pin, int mode)
void printNChar (char ch, int n)
 prints n times the character ch and a new line
void printVersionInfo ()
 prints the available version information
template<typename T>
T readSample (Stream *p_stream)
 guaranteed to return the requested data
template<typename T>
size_t readSamples (Stream *p_stream, T *data, int samples, int retryCount=-1)
 guaranteed to return the requested data
void stop ()
 stops any further processing by spinning in an endless loop
static void timerCallback (void *obj)
static void timerCallback0 ()
static void timerCallback1 ()
static void timerCallback2 ()
static void timerCallback3 ()
const char * toMime (AudioFormat format)
 Provides the mime type for a AudioFormat wav code, or nullptr if not known/mapped.
static void userCallback0 ()
static void userCallback1 ()
static void userCallback2 ()
static void userCallback3 ()
void waitFor (bool &flag)
 wait for flag to be active
template<typename T>
size_t writeData (Print *p_out, T *data, int samples, int maxSamples=512)
template<typename T, class P>
size_t writeDataT (P *p_out, T *data, int samples, int maxSamples=512)
 guaranteed to return the requested data
void yield ()

Variables

static TAllocatorExt DefaultAllocator
static TAllocatorSTD DefaultAllocatorRAM
static AllocatorESP32 DefaultESP32AllocatorRAM
template<class T>
constexpr int16_t FastIntSineGenerator< T >::sine_table []
static gpio_dt_spec GPIO_NONE = {nullptr, 0, 0}
 GPIO_NONE is no pin defined.
static const char * i2s_formats []
static const char * i2s_signal_types [] = {"Digital", "Analog", "PDM", "TDM"}
static const char * mime_pcm = "audio/pcm"
 Mime type for PCM.
static const char * RxTxModeNames [4]
 Text string (description) for RxTxMode.
static HardwareSerial Serial
class audio_tools::audio_tools::UserCallback * simpleUserCallback = nullptr
static AudioTimerDriverMBED * timerAlarmRepeating = nullptr
static AudioTimerDriverSTM32 * timerAlarmRepeating = nullptr
static AudioTimerDriverAVR * timerAlarmRepeatingRef = nullptr
class audio_tools::audio_tools::TimerCallback * timerCallbackArray = nullptr
static const char * TimeUnitStr [3] {"MS", "US", "HZ"}

Macro Definition Documentation

◆ A2DP_BUFFER_COUNT

#define A2DP_BUFFER_COUNT   30

◆ A2DP_BUFFER_SIZE

#define A2DP_BUFFER_SIZE   512

◆ ANALOG_BUFFER_COUNT

#define ANALOG_BUFFER_COUNT   6

◆ ANALOG_BUFFER_SIZE [1/2]

#define ANALOG_BUFFER_SIZE   512

◆ ANALOG_BUFFER_SIZE [2/2]

#define ANALOG_BUFFER_SIZE   512

◆ ANALOG_BUFFERS [1/2]

#define ANALOG_BUFFERS   50

◆ ANALOG_BUFFERS [2/2]

#define ANALOG_BUFFERS   5

◆ ANALOG_MAX_OUT_CHANNELS

#define ANALOG_MAX_OUT_CHANNELS   1

◆ ANALOG_MAX_SAMPLE_RATE

#define ANALOG_MAX_SAMPLE_RATE   16000

◆ ARDUINO

#define ARDUINO

◆ assert

#define assert ( T)

◆ AUDIO_INCLUDE_CORE

#define AUDIO_INCLUDE_CORE   true

◆ AUDIOTOOLS_MAJOR_VERSION

#define AUDIOTOOLS_MAJOR_VERSION   1

◆ AUDIOTOOLS_METADATA_ICY_ASCII_ONLY

#define AUDIOTOOLS_METADATA_ICY_ASCII_ONLY   true

◆ AUDIOTOOLS_METADATA_ICY_LIMIT

#define AUDIOTOOLS_METADATA_ICY_LIMIT   400

◆ AUDIOTOOLS_MINOR_VERSION

#define AUDIOTOOLS_MINOR_VERSION   2

◆ AUDIOTOOLS_VERSION

#define AUDIOTOOLS_VERSION   "1.2.4"

◆ CHECK_MEMORY

#define CHECK_MEMORY ( )

◆ CODEC_DELAY_MS

#define CODEC_DELAY_MS   10

◆ COPY_DELAY_ON_NODATA

#define COPY_DELAY_ON_NODATA   10

◆ COPY_RETRY_LIMIT

#define COPY_RETRY_LIMIT   20

◆ DEFAULT_BITS_PER_SAMPLE

#define DEFAULT_BITS_PER_SAMPLE   16

◆ DEFAULT_BUFFER_SIZE [1/2]

#define DEFAULT_BUFFER_SIZE   125

◆ DEFAULT_BUFFER_SIZE [2/2]

#define DEFAULT_BUFFER_SIZE   1024

◆ DEFAULT_CHANNELS

#define DEFAULT_CHANNELS   2

◆ DEFAULT_PCM_FRAGMENT_SIZE

#define DEFAULT_PCM_FRAGMENT_SIZE   640

◆ DEFAULT_SAMPLE_RATE

#define DEFAULT_SAMPLE_RATE   44100

◆ DESKTOP_MILLIS_DEFINED

#define DESKTOP_MILLIS_DEFINED

◆ df2str

#define df2str ( s)
Value:
#define df2xstr(s)

◆ df2xstr

#define df2xstr ( s)
Value:
#s

◆ ESP_ARDUINO_VERSION_STR

#define ESP_ARDUINO_VERSION_STR   df2str(ESP_ARDUINO_VERSION_MAJOR) "." df2str(ESP_ARDUINO_VERSION_MINOR) "." df2str(ESP_ARDUINO_VERSION_PATCH)

◆ ESP_IDF_VERSION_VAL

#define ESP_IDF_VERSION_VAL ( a,
b,
c )
Value:
0

◆ EXIT_ON_STOP

#define EXIT_ON_STOP

◆ FIX_SYNC_SYNCHRONIZE

#define FIX_SYNC_SYNCHRONIZE

◆ GPIO_NONE

#define GPIO_NONE   -1

◆ GPIO_TO_INT [1/2]

#define GPIO_TO_INT ( pin)
Value:
pin.pin

◆ GPIO_TO_INT [2/2]

#define GPIO_TO_INT ( pin)
Value:
pin

◆ GPIO_TO_STR [1/2]

#define GPIO_TO_STR ( pin)
Value:
std::to_string(GPIO_TO_INT(pin)).c_str()
#define GPIO_TO_INT(pin)

◆ GPIO_TO_STR [2/2]

#define GPIO_TO_STR ( pin)
Value:
std::to_string(pin).c_str()

◆ HIGH

#define HIGH   0x1

◆ HTTP_CHUNKED_SIZE_MAX_LEN

#define HTTP_CHUNKED_SIZE_MAX_LEN   80

◆ HTTP_MAX_LEN

#define HTTP_MAX_LEN   1024

◆ I2S_BUFFER_COUNT

#define I2S_BUFFER_COUNT   6

◆ I2S_BUFFER_SIZE

#define I2S_BUFFER_SIZE   512

◆ I2S_DEFAULT_PORT

#define I2S_DEFAULT_PORT   0

◆ I2S_USE_APLL [1/2]

#define I2S_USE_APLL   false

◆ I2S_USE_APLL [2/2]

#define I2S_USE_APLL   false

◆ INPUT

#define INPUT   0x0

◆ INPUT_PULLUP

#define INPUT_PULLUP   0x2

◆ INT24_MAX [1/2]

#define INT24_MAX   0x7FFFFF

◆ INT24_MAX [2/2]

#define INT24_MAX   0x7FFFFF

◆ IRAM_ATTR

#define IRAM_ATTR

◆ IS_GPIO [1/2]

#define IS_GPIO ( pin)
Value:
(pin.port != nullptr)

◆ IS_GPIO [2/2]

#define IS_GPIO ( pin)
Value:
(pin >= 0)

◆ IS_NOARDUINO

#define IS_NOARDUINO

◆ IS_RENESAS

#define IS_RENESAS   1

◆ LOG_LEVEL

#define LOG_LEVEL   AudioLogger::Warning

◆ LOG_METHOD

#define LOG_METHOD   __PRETTY_FUNCTION__

◆ LOG_PRINTF_BUFFER_SIZE [1/2]

#define LOG_PRINTF_BUFFER_SIZE   60

◆ LOG_PRINTF_BUFFER_SIZE [2/2]

#define LOG_PRINTF_BUFFER_SIZE   303

◆ LOG_STREAM

#define LOG_STREAM   Serial

◆ LOGD

#define LOGD ( ...)

◆ LOGE

#define LOGE ( ...)

◆ LOGI

#define LOGI ( ...)

◆ LOGW

#define LOGW ( ...)

◆ LOW

#define LOW   0x0

◆ MAX_SINGLE_CHARS

#define MAX_SINGLE_CHARS   8

◆ NO_INPLACE_INIT_SUPPORT [1/2]

#define NO_INPLACE_INIT_SUPPORT

◆ NO_INPLACE_INIT_SUPPORT [2/2]

#define NO_INPLACE_INIT_SUPPORT

◆ NO_TRACE

#define NO_TRACE

◆ NO_TRACED

#define NO_TRACED

◆ NO_TRACEE

#define NO_TRACEE

◆ NO_TRACEI

#define NO_TRACEI

◆ OUTPUT

#define OUTPUT   0x1

◆ PI

#define PI   3.14159265359f

◆ PIN_ANALOG_START [1/3]

#define PIN_ANALOG_START   26

◆ PIN_ANALOG_START [2/3]

#define PIN_ANALOG_START   PA0

◆ PIN_ANALOG_START [3/3]

#define PIN_ANALOG_START   A0

◆ PIN_CS [1/6]

#define PIN_CS   SS

◆ PIN_CS [2/6]

#define PIN_CS   SS

◆ PIN_CS [3/6]

#define PIN_CS   1

◆ PIN_CS [4/6]

#define PIN_CS   4

◆ PIN_CS [5/6]

#define PIN_CS   -1

◆ PIN_CS [6/6]

#define PIN_CS   9

◆ PIN_I2S_BCK [1/5]

#define PIN_I2S_BCK   13

◆ PIN_I2S_BCK [2/5]

#define PIN_I2S_BCK   -1

◆ PIN_I2S_BCK [3/5]

#define PIN_I2S_BCK   26

◆ PIN_I2S_BCK [4/5]

#define PIN_I2S_BCK   1

◆ PIN_I2S_BCK [5/5]

#define PIN_I2S_BCK   -1

◆ PIN_I2S_DATA_IN [1/5]

#define PIN_I2S_DATA_IN   12

◆ PIN_I2S_DATA_IN [2/5]

#define PIN_I2S_DATA_IN   -1

◆ PIN_I2S_DATA_IN [3/5]

#define PIN_I2S_DATA_IN   28

◆ PIN_I2S_DATA_IN [4/5]

#define PIN_I2S_DATA_IN   3

◆ PIN_I2S_DATA_IN [5/5]

#define PIN_I2S_DATA_IN   -1

◆ PIN_I2S_DATA_OUT [1/5]

#define PIN_I2S_DATA_OUT   11

◆ PIN_I2S_DATA_OUT [2/5]

#define PIN_I2S_DATA_OUT   -1

◆ PIN_I2S_DATA_OUT [3/5]

#define PIN_I2S_DATA_OUT   28

◆ PIN_I2S_DATA_OUT [4/5]

#define PIN_I2S_DATA_OUT   3

◆ PIN_I2S_DATA_OUT [5/5]

#define PIN_I2S_DATA_OUT   -1

◆ PIN_I2S_MUTE [1/5]

#define PIN_I2S_MUTE   -1

◆ PIN_I2S_MUTE [2/5]

#define PIN_I2S_MUTE   23

◆ PIN_I2S_MUTE [3/5]

#define PIN_I2S_MUTE   -1

◆ PIN_I2S_MUTE [4/5]

#define PIN_I2S_MUTE   -1

◆ PIN_I2S_MUTE [5/5]

#define PIN_I2S_MUTE   -1

◆ PIN_I2S_WS [1/5]

#define PIN_I2S_WS   10

◆ PIN_I2S_WS [2/5]

#define PIN_I2S_WS   -1

◆ PIN_I2S_WS [3/5]

#define PIN_I2S_WS   PIN_I2S_BCK+1

◆ PIN_I2S_WS [4/5]

#define PIN_I2S_WS   PIN_I2S_BCK+1

◆ PIN_I2S_WS [5/5]

#define PIN_I2S_WS   -1

◆ PIN_PWM_COUNT

#define PIN_PWM_COUNT   12

◆ PIN_PWM_START [1/5]

#define PIN_PWM_START   6

◆ PIN_PWM_START [2/5]

#define PIN_PWM_START   12

◆ PIN_PWM_START [3/5]

#define PIN_PWM_START   6

◆ PIN_PWM_START [4/5]

#define PIN_PWM_START   PA0

◆ PIN_PWM_START [5/5]

#define PIN_PWM_START   D2

◆ PREFER_FIXEDPOINT

#define PREFER_FIXEDPOINT   false

◆ PRINT_FLUSH_OVERRIDE

#define PRINT_FLUSH_OVERRIDE

◆ PSTR

#define PSTR ( fmt)
Value:
fmt

◆ PWM_AUDIO_FREQUENCY

#define PWM_AUDIO_FREQUENCY   30000

◆ PWM_BUFFER_COUNT

#define PWM_BUFFER_COUNT   4

◆ PWM_BUFFER_SIZE [1/2]

#define PWM_BUFFER_SIZE   125

◆ PWM_BUFFER_SIZE [2/2]

#define PWM_BUFFER_SIZE   1024

◆ PWM_DEFAULT_TIMER

#define PWM_DEFAULT_TIMER   TIM2

◆ PWM_FREQ_TIMER_NO

#define PWM_FREQ_TIMER_NO   3

◆ PWM_MAX_SAMPLE_RATE

#define PWM_MAX_SAMPLE_RATE   8000

◆ RP2040_MBED

#define RP2040_MBED

◆ SOFT_MUTE_VALUE [1/4]

#define SOFT_MUTE_VALUE   0

◆ SOFT_MUTE_VALUE [2/4]

#define SOFT_MUTE_VALUE   0

◆ SOFT_MUTE_VALUE [3/4]

#define SOFT_MUTE_VALUE   0

◆ SOFT_MUTE_VALUE [4/4]

#define SOFT_MUTE_VALUE   0

◆ STREAM_READ_OVERRIDE

#define STREAM_READ_OVERRIDE

◆ STREAM_READCHAR_OVERRIDE

#define STREAM_READCHAR_OVERRIDE

◆ STREAM_WRITE_OVERRIDE

#define STREAM_WRITE_OVERRIDE

◆ TRACED

#define TRACED ( )

◆ TRACEE

#define TRACEE ( )

◆ TRACEI

#define TRACEI ( )

◆ TRACEW

#define TRACEW ( )

◆ URL_CLIENT_TIMEOUT [1/2]

#define URL_CLIENT_TIMEOUT   60000

◆ URL_CLIENT_TIMEOUT [2/2]

#define URL_CLIENT_TIMEOUT   60000;

◆ URL_HANDSHAKE_TIMEOUT

#define URL_HANDSHAKE_TIMEOUT   120000

◆ USE_ALLOCATOR

#define USE_ALLOCATOR   false

◆ USE_ANALOG [1/2]

#define USE_ANALOG

◆ USE_ANALOG [2/2]

#define USE_ANALOG

◆ USE_ANALOG_ARDUINO [1/3]

#define USE_ANALOG_ARDUINO

◆ USE_ANALOG_ARDUINO [2/3]

#define USE_ANALOG_ARDUINO

◆ USE_ANALOG_ARDUINO [3/3]

#define USE_ANALOG_ARDUINO

◆ USE_AUDIO_LOGGING

#define USE_AUDIO_LOGGING   true

◆ USE_AUDIO_SERVER [1/2]

#define USE_AUDIO_SERVER

◆ USE_AUDIO_SERVER [2/2]

#define USE_AUDIO_SERVER

◆ USE_AUDIOTOOLS_NS

#define USE_AUDIOTOOLS_NS   true

◆ USE_CHECK_MEMORY

#define USE_CHECK_MEMORY   false

◆ USE_CONCURRENCY

#define USE_CONCURRENCY

◆ USE_CPP_TASK

#define USE_CPP_TASK

◆ USE_ESP32_LOGGER

#define USE_ESP32_LOGGER   false

◆ USE_ETHERNET [1/2]

#define USE_ETHERNET

◆ USE_ETHERNET [2/2]

#define USE_ETHERNET

◆ USE_I2S [1/3]

#define USE_I2S

◆ USE_I2S [2/3]

#define USE_I2S

◆ USE_I2S [3/3]

#define USE_I2S

◆ USE_INT24_FROM_INT [1/4]

#define USE_INT24_FROM_INT

◆ USE_INT24_FROM_INT [2/4]

#define USE_INT24_FROM_INT

◆ USE_INT24_FROM_INT [3/4]

#define USE_INT24_FROM_INT

◆ USE_INT24_FROM_INT [4/4]

#define USE_INT24_FROM_INT

◆ USE_LEGACY_I2S

#define USE_LEGACY_I2S   (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0))

◆ USE_OBSOLETE

#define USE_OBSOLETE   false

◆ USE_OPENCV

#define USE_OPENCV

◆ USE_PRINT_FLUSH

#define USE_PRINT_FLUSH   true

◆ USE_PSRAM

#define USE_PSRAM

◆ USE_PWM [1/4]

#define USE_PWM

◆ USE_PWM [2/4]

#define USE_PWM

◆ USE_PWM [3/4]

#define USE_PWM

◆ USE_PWM [4/4]

#define USE_PWM

◆ USE_RESAMPLE_BUFFER

#define USE_RESAMPLE_BUFFER   true

◆ USE_SD_NO_NS [1/5]

#define USE_SD_NO_NS

◆ USE_SD_NO_NS [2/5]

#define USE_SD_NO_NS

◆ USE_SD_NO_NS [3/5]

#define USE_SD_NO_NS

◆ USE_SD_NO_NS [4/5]

#define USE_SD_NO_NS

◆ USE_SD_NO_NS [5/5]

#define USE_SD_NO_NS

◆ USE_SD_SUPPORTS_SPI [1/2]

#define USE_SD_SUPPORTS_SPI

◆ USE_SD_SUPPORTS_SPI [2/2]

#define USE_SD_SUPPORTS_SPI

◆ USE_SERVER_ACCEPT [1/2]

#define USE_SERVER_ACCEPT   true

◆ USE_SERVER_ACCEPT [2/2]

#define USE_SERVER_ACCEPT   1

◆ USE_STD_CONCURRENCY

#define USE_STD_CONCURRENCY

◆ USE_STRTOD

#define USE_STRTOD

◆ USE_TASK

#define USE_TASK   false

◆ USE_TIMER [1/6]

#define USE_TIMER

◆ USE_TIMER [2/6]

#define USE_TIMER

◆ USE_TIMER [3/6]

#define USE_TIMER

◆ USE_TIMER [4/6]

#define USE_TIMER

◆ USE_TIMER [5/6]

#define USE_TIMER

◆ USE_TIMER [6/6]

#define USE_TIMER

◆ USE_TYPETRAITS [1/3]

#define USE_TYPETRAITS

◆ USE_TYPETRAITS [2/3]

#define USE_TYPETRAITS

◆ USE_TYPETRAITS [3/3]

#define USE_TYPETRAITS

◆ USE_URL_ARDUINO [1/4]

#define USE_URL_ARDUINO

◆ USE_URL_ARDUINO [2/4]

#define USE_URL_ARDUINO

◆ USE_URL_ARDUINO [3/4]

#define USE_URL_ARDUINO

◆ USE_URL_ARDUINO [4/4]

#define USE_URL_ARDUINO

◆ USE_WIFI [1/2]

#define USE_WIFI

◆ USE_WIFI [2/2]

#define USE_WIFI

◆ VS1053_CS

#define VS1053_CS   6

◆ VS1053_CS_SD

#define VS1053_CS_SD   9

◆ VS1053_DCS

#define VS1053_DCS   7

◆ VS1053_DEFAULT_VOLUME

#define VS1053_DEFAULT_VOLUME   0.7

◆ VS1053_DEFINED

#define VS1053_DEFINED

◆ VS1053_DREQ

#define VS1053_DREQ   2

◆ VS1053_EXT

#define VS1053_EXT   1

◆ VS1053_RESET

#define VS1053_RESET   8

◆ ZLOGE

#define ZLOGE ( ...)
Value:
printk(__VA_ARGS__)