arduino-audio-tools
Loading...
Searching...
No Matches
audio_tools::audio_tools Namespace Reference

AutioTools Configuration. More...

Classes

class  AdapterAudioOutputToAudioStream
 Wrapper which converts a AudioStream to a AudioOutput. More...
class  AdapterAudioStreamToAudioOutput
 Wrapper which converts a AudioStream to a AudioOutput. More...
class  AdapterPrintToAudioOutput
 Wrapper which converts a Print to a AudioOutput. More...
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
 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  AudioOutputAdapter
 Base class for Output Adpapters. 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  AudioTimeSourceStream
 AudioTimeSourceStream: A stream that provides time information based on the audio data actually processed - implements the TimeSource interface. millis() (inherited, unmodified) is plain wall time; playbackTime() is the audio-derived progress, which is what a consumer that must stay tied to genuine playback (e.g. PacedVideoOutput) should use instead - see playbackTime()'s own comment for why they can diverge. More...
class  AudioWriter
 E.g. used by Encoders and Decoders. More...
class  AudioWriterToAudioOutput
 Adapter class which lets an AudioWriter behave like a Print. More...
class  BandPassFilter
 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
 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
 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...
class  BinT
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
 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
 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
 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
 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
 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...
class  ChannelBinDiffT
 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
 Increasing or decreasing the number of channels. More...
class  ChannelDiff
class  ChannelDiffT
 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
 Increases the channel count. More...
class  ChannelMixer
 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
 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  ChannelSplitOutput
 Simple functionality to extract mono streams from a multichannel (e.g. stereo) signal. More...
class  ChannelsSelectOutput
 Flexible functionality to extract one or more channels from a multichannel signal. Warning: the destinatios added with addOutput are not automatically notified about audio changes. More...
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  ContainerTarget
 ContainerTarget: forwards requests to both the output and the encoder/decoder and sets up the output chain for Containers. We also manage the proper sequence of the output classes. More...
class  ContainerTargetPrint
class  Converter1Channel
 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
 Makes sure that the avg of the signal is set to 0. More...
class  ConverterFillLeftAndRight
 Make sure that both channels contain any data. We copy the data from the non-empty channel to the empty one. More...
class  ConverterInvert
 Inverts the signal (multiplies every sample by -1). More...
class  ConverterNChannels
 Converter for n Channels which applies the indicated Filter. More...
class  ConverterScaler
 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
 Both the data of the read or write operations will be converted with the help of the indicated converter. More...
class  ConverterSwitchLeftAndRight
 Switches the left and right channel. More...
class  ConverterToInternalDACFormat
 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
 Copy channel Cx value of type T shifted by S bits to all Cn channels. More...
class  CsvOutput
 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...
class  DecimateT
 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  EncodedAudioOutput
 A more natural Print class to process encoded data (aac, wav, mp3...). Just define the output and the decoder and write the encoded data. More...
class  EncodedAudioStream
 A more natural Stream class to process encoded data (aac, wav, mp3...) which also supports the decoding by calling readBytes(). More...
class  FastIntSineGenerator
 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
 Sine wave which is based on a fast approximation function using floating point math. More...
class  Filter
 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
 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
 Stream to which we can apply Filters for each channel. The filter might change the result size! More...
struct  FilterSampleConverter
 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
 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
 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
 A FrameBuffer reads multiple values for array of 2 dimensional frames. More...
class  GeneratedSoundStream
 Source for reading generated tones. Please note. More...
class  GeneratorFixedValue
 Just returns a constant value. More...
class  GeneratorFromArray
 We generate the samples from an array which is provided in the constructor. More...
class  GeneratorFromStream
 An Adapter Class which lets you use any Stream as a Generator. More...
class  GeneratorMixer
 Generator which combines (mixes) multiple sound generators into one output. More...
class  GeneratorQueue
 Queues SoundGenerators and plays them sequentially. Queued SoundGenerators must be limited (eg: setPlayTime()) or no later Generator will ever be played. More...
class  HexDumpOutput
 Creates a Hex Dump. More...
class  HighPassFilter
 Second-order high-pass filter (BiQuad DF2). Attenuates frequencies below the cutoff frequency. Coefficients are derived from the Audio EQ Cookbook. More...
class  HighPassFilterDF1
 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
 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
 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
 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
 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
 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
 Double linked list. More...
class  LowPassFilter
 Second-order low-pass filter (BiQuad DF2). Attenuates frequencies above the cutoff frequency. Coefficients are derived from the Audio EQ Cookbook. More...
class  LowPassFilterDF1
 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
 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
 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...
class  MimeSource
 Abstract interface for classes that can provide MIME type information. More...
struct  MixGain
 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
 Combines multiple converters. More...
class  MultiOutput
 Replicates the output to multiple destinations. More...
class  NBuffer
 A N buffer. If count=2 we create a DoubleBuffer, if count=3 a TripleBuffer etc. More...
class  NBufferExt
 A NBufferExt is a subclass of NBuffer which allows to use a direct access API to the BaseBuffer. More...
class  NBufferFile
 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...
class  NoFilter
 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
 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
 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  OutputMixer
class  PinkNoiseGenerator
 Generates pink noise. More...
class  PoppingSoundRemover
 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  PriorityQueue
 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...
class  Queue
 FIFO Queue which is based on a List. More...
class  QueueFromVector
 FIFO Queue which is based on a Vector. More...
class  QueueStream
 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  ReformatBaseStream
 Base class for chained converting streams. More...
class  RingBuffer
 Implements a typed Ringbuffer. More...
class  RingBufferFile
 An File backed Ring Buffer that we can use to receive streaming audio. We expect an open file as parameter. More...
class  RingBufferSPSC
 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
 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
 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
 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
 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
 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
 A sine generator based on a table. The table is created using degrees where one full wave is 360 degrees. More...
class  SingleBuffer
 A simple Buffer implementation which just uses a (dynamically sized) array. More...
class  Slice
 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
 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
 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
 Base class to define the abstract interface for the sound generating classes. More...
class  SquareWaveGenerator
 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
 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  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
 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  TimedStream
 AudioStream class that can define a start and (an optional) stop time Usually it is used to wrap an Audio Sink (e.g. I2SStream), but wrapping an Audio Source is supported as well. Only wrap classes which represent PCM data! 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  TransformationReader
 ConverterStream Helper class which implements the readBytes with the help of write. 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
 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
 Generates a random noise sound with the help of rand() function. More...

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 EncodedAudioPrint = EncodedAudioOutput
 Legacy alias for EncodedAudioOutput.
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.

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 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  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  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  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  MemoryType {
  RAM , PS_RAM , FLASH_RAM , RAM ,
  PS_RAM , FLASH_RAM
}
 Memory types. More...
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  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  TimerFunction {
  DirectTimerCallback , TimerCallbackInThread , SimpleThreadLoop , DirectTimerCallback ,
  TimerCallbackInThread , SimpleThreadLoop
}
enum  TimeUnit {
  MS , US , HZ , MS ,
  US , HZ
}
 Time Units. More...
enum  TimeUnit {
  MS , US , HZ , MS ,
  US , HZ
}
 Time Units. More...

Functions

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).
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.
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"}

Detailed Description

AutioTools Configuration.

Author
Phil Schatzmann
Author
Phil Schatzmann

AutioTools Configuration

Author
Phil Schatzmann

AutioTools Configuration

Author
Phil Schatzmann

AutioTools Configuration

Author
Phil Schatzmann
Author
Phil Schatzmann
Author
Phil Schatzmann

AutioTools Configuration

Typedef Documentation

◆ ActivityCallback

typedef void(* ActivityCallback)(bool isActive) = void (*)(bool isActive)

Callback function type for activity state changes.

◆ AudioTimerDriver

use AudioTimer!

Default timer implementation for Zephyr.

◆ CallbackConverter

CallbackConverter with int16_t as default type.

◆ digital_pin_t

typedef int digital_pin_t = gpio_dt_spec

Zephyr GPIO spec as digital_pin_t.

◆ int24_t

◆ my_repeating_timer_callback_t

typedef void(* my_repeating_timer_callback_t)(void *obj)

◆ PseudoFloat

◆ repeating_timer_callback_t

typedef void(* repeating_timer_callback_t)(void *obj)

◆ SineGenerator

template<class T = int16_t>
using SineGenerator = FloatSineGenerator<T>

Default sine generator: FastIntSineGenerator (no FPU needed) on platforms that set PREFER_FIXEDPOINT, FloatSineGenerator (sinf() based) otherwise.

◆ SineWaveGenerator

template<class T = int16_t>
using SineWaveGenerator = SineGenerator<T>

Alias for SineGenerator.

◆ TAllocatorExt

◆ TAllocatorSTD

◆ TimerAlarmRepeating

Enumeration Type Documentation

◆ I2SFormat [1/2]

enum I2SFormat

I2S Formats.

Enumerator
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 

◆ I2SFormat [2/2]

enum I2SFormat

I2S Formats.

Enumerator
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 

◆ I2SSignalType [1/2]

I2S Signal Types: Digital, Analog, PDM.

Enumerator
Digital 
Analog 
PDM 
TDM 
Digital 
Analog 
PDM 
TDM 

◆ I2SSignalType [2/2]

I2S Signal Types: Digital, Analog, PDM.

Enumerator
Digital 
Analog 
PDM 
TDM 
Digital 
Analog 
PDM 
TDM 

◆ MediaType

enum MediaType

Media type enumeration for RTSP streams.

Enumerator
MEDIA_AUDIO 

Audio stream.

MEDIA_VIDEO 

Video stream.

◆ RTSPVideoFormat

enum class RTSPVideoFormat
strong

Video format enumeration for different pixel formats.

Note
Scoped (and named RTSPVideoFormat, not VideoFormat) to avoid colliding with the unrelated audio_tools::VideoFormat enum in AudioTools/Video/VideoOutput.h (used by the container muxers/demuxers) - both live in the audio_tools namespace, and a translation unit that needs both RTSP.h and a container header (e.g. to mux audio+video into MPEG-TS before streaming it over RTSP) would otherwise hit a redefinition error.
Enumerator
RGB24 

24-bit RGB (8 bits per channel)

RGB565 

16-bit RGB (5-6-5 bits per channel)

YUV420 

YUV 4:2:0 planar format.

JPEG 

JPEG compressed format.

MJPEG 

Motion JPEG format.

GRAYSCALE 

8-bit grayscale

H264 

H.264/AVC compressed format.

◆ TimerFunction [1/2]

Enumerator
DirectTimerCallback 
TimerCallbackInThread 
SimpleThreadLoop 
DirectTimerCallback 
TimerCallbackInThread 
SimpleThreadLoop 

◆ TimerFunction [2/2]

Enumerator
DirectTimerCallback 
TimerCallbackInThread 
SimpleThreadLoop 
DirectTimerCallback 
TimerCallbackInThread 
SimpleThreadLoop 

Function Documentation

◆ calculateBandPassCoeffs()

BiQuadCoeffs calculateBandPassCoeffs ( float frequency,
float sampleRate,
float q )
inline

Computes the b0/b1/b2/a1/a2 biquad coefficients for a band-pass filter.

◆ calculateHighPassCoeffs()

BiQuadCoeffs calculateHighPassCoeffs ( float frequency,
float sampleRate,
float q )
inline

Computes the b0/b1/b2/a1/a2 biquad coefficients for a high-pass filter.

◆ calculateHighShelfCoeffs()

BiQuadCoeffs calculateHighShelfCoeffs ( float frequency,
float sampleRate,
float gain,
float slope )
inline

Computes the b0/b1/b2/a1/a2 biquad coefficients for a high-shelf filter.

◆ calculateLowPassCoeffs()

BiQuadCoeffs calculateLowPassCoeffs ( float frequency,
float sampleRate,
float q )
inline

Computes the b0/b1/b2/a1/a2 biquad coefficients for a low-pass filter.

◆ calculateLowShelfCoeffs()

BiQuadCoeffs calculateLowShelfCoeffs ( float frequency,
float sampleRate,
float gain,
float slope )
inline

Computes the b0/b1/b2/a1/a2 biquad coefficients for a low-shelf filter.

◆ calculateNotchCoeffs()

BiQuadCoeffs calculateNotchCoeffs ( float frequency,
float sampleRate,
float q )
inline

Computes the b0/b1/b2/a1/a2 biquad coefficients for a notch (band-reject) filter.

◆ checkCoeffRange()

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).

◆ delay()

void delay ( uint32_t ms)
inline

◆ delayMicroseconds()

void delayMicroseconds ( uint32_t us)
inline

◆ digitalRead()

int digitalRead ( digital_pin_t pin)

◆ digitalWrite()

void digitalWrite ( digital_pin_t pin,
bool value )

◆ mapT()

template<typename T>
T mapT ( T x,
T in_min,
T in_max,
T out_min,
T out_max )
inline

Similar to Arduino map function but using floats.

Parameters
x
in_min
in_max
out_min
out_max
Returns

◆ micros()

uint64_t micros ( void )
inline

◆ millis()

uint32_t millis ( )
inline

Returns the milliseconds since the start.

◆ operator!=() [1/5]

bool operator!= ( audio_tools::digital_pin_t & a,
audio_tools::digital_pin_t & b )
inlinestatic

Support for pin compare.

◆ operator!=() [2/5]

bool operator!= ( double a,
soft_float_t b )
inline

◆ operator!=() [3/5]

bool operator!= ( float a,
q1_14_t b )
inline

◆ operator!=() [4/5]

bool operator!= ( float a,
soft_float_t b )
inline

◆ operator!=() [5/5]

bool operator!= ( int a,
soft_float_t b )
inline

◆ operator*() [1/4]

soft_float_t operator* ( double a,
soft_float_t b )
inline

◆ operator*() [2/4]

q1_14_t operator* ( float a,
q1_14_t b )
inline

◆ operator*() [3/4]

soft_float_t operator* ( float a,
soft_float_t b )
inline

◆ operator*() [4/4]

soft_float_t operator* ( int a,
soft_float_t b )
inline

◆ operator+() [1/4]

soft_float_t operator+ ( double a,
soft_float_t b )
inline

◆ operator+() [2/4]

q1_14_t operator+ ( float a,
q1_14_t b )
inline

◆ operator+() [3/4]

soft_float_t operator+ ( float a,
soft_float_t b )
inline

◆ operator+() [4/4]

soft_float_t operator+ ( int a,
soft_float_t b )
inline

◆ operator-() [1/4]

soft_float_t operator- ( double a,
soft_float_t b )
inline

◆ operator-() [2/4]

q1_14_t operator- ( float a,
q1_14_t b )
inline

◆ operator-() [3/4]

soft_float_t operator- ( float a,
soft_float_t b )
inline

◆ operator-() [4/4]

soft_float_t operator- ( int a,
soft_float_t b )
inline

◆ operator/() [1/4]

soft_float_t operator/ ( double a,
soft_float_t b )
inline

◆ operator/() [2/4]

q1_14_t operator/ ( float a,
q1_14_t b )
inline

◆ operator/() [3/4]

soft_float_t operator/ ( float a,
soft_float_t b )
inline

◆ operator/() [4/4]

soft_float_t operator/ ( int a,
soft_float_t b )
inline

◆ operator<() [1/4]

bool operator< ( double a,
soft_float_t b )
inline

◆ operator<() [2/4]

bool operator< ( float a,
q1_14_t b )
inline

◆ operator<() [3/4]

bool operator< ( float a,
soft_float_t b )
inline

◆ operator<() [4/4]

bool operator< ( int a,
soft_float_t b )
inline

◆ operator<=() [1/4]

bool operator<= ( double a,
soft_float_t b )
inline

◆ operator<=() [2/4]

bool operator<= ( float a,
q1_14_t b )
inline

◆ operator<=() [3/4]

bool operator<= ( float a,
soft_float_t b )
inline

◆ operator<=() [4/4]

bool operator<= ( int a,
soft_float_t b )
inline

◆ operator==() [1/5]

bool operator== ( audio_tools::digital_pin_t & a,
audio_tools::digital_pin_t & b )
inlinestatic

Support for pin compare.

◆ operator==() [2/5]

bool operator== ( double a,
soft_float_t b )
inline

◆ operator==() [3/5]

bool operator== ( float a,
q1_14_t b )
inline

◆ operator==() [4/5]

bool operator== ( float a,
soft_float_t b )
inline

◆ operator==() [5/5]

bool operator== ( int a,
soft_float_t b )
inline

◆ operator>() [1/4]

bool operator> ( double a,
soft_float_t b )
inline

◆ operator>() [2/4]

bool operator> ( float a,
q1_14_t b )
inline

◆ operator>() [3/4]

bool operator> ( float a,
soft_float_t b )
inline

◆ operator>() [4/4]

bool operator> ( int a,
soft_float_t b )
inline

◆ operator>=() [1/4]

bool operator>= ( double a,
soft_float_t b )
inline

◆ operator>=() [2/4]

bool operator>= ( float a,
q1_14_t b )
inline

◆ operator>=() [3/4]

bool operator>= ( float a,
soft_float_t b )
inline

◆ operator>=() [4/4]

bool operator>= ( int a,
soft_float_t b )
inline

◆ pinMode()

void pinMode ( digital_pin_t pin,
int mode )

◆ printVersionInfo()

void printVersionInfo ( )
inline

prints the available version information

◆ readSample()

template<typename T>
T readSample ( Stream * p_stream)

guaranteed to return the requested data

◆ readSamples()

template<typename T>
size_t readSamples ( Stream * p_stream,
T * data,
int samples,
int retryCount = -1 )

guaranteed to return the requested data

◆ timerCallback()

void timerCallback ( void * obj)
static

◆ timerCallback0()

void timerCallback0 ( )
static

◆ timerCallback1()

void timerCallback1 ( )
static

◆ timerCallback2()

void timerCallback2 ( )
static

◆ timerCallback3()

void timerCallback3 ( )
static

◆ userCallback0()

void userCallback0 ( )
static

◆ userCallback1()

void userCallback1 ( )
static

◆ userCallback2()

void userCallback2 ( )
static

◆ userCallback3()

void userCallback3 ( )
static

◆ writeData()

template<typename T>
size_t writeData ( Print * p_out,
T * data,
int samples,
int maxSamples = 512 )

◆ writeDataT()

template<typename T, class P>
size_t writeDataT ( P * p_out,
T * data,
int samples,
int maxSamples = 512 )

guaranteed to return the requested data

◆ yield()

void yield ( )
inline

Variable Documentation

◆ DefaultAllocator

TAllocatorExt DefaultAllocator
static

◆ DefaultAllocatorRAM

TAllocatorSTD DefaultAllocatorRAM
static

◆ DefaultESP32AllocatorRAM

AllocatorESP32 DefaultESP32AllocatorRAM
static

◆ FastIntSineGenerator< T >::sine_table

template<class T>
int16_t FastIntSineGenerator< T >::sine_table[]
constexpr

◆ GPIO_NONE

gpio_dt_spec GPIO_NONE = {nullptr, 0, 0}
static

GPIO_NONE is no pin defined.

◆ i2s_formats

const char * i2s_formats
static
Initial value:
= {"I2S_STD_FORMAT",
"I2S_LSB_FORMAT",
"I2S_MSB_FORMAT",
"I2S_PHILIPS_FORMAT",
"I2S_RIGHT_JUSTIFIED_FORMAT",
"I2S_LEFT_JUSTIFIED_FORMAT",
"I2S_PCM"}

◆ i2s_signal_types

const char * i2s_signal_types = {"Digital", "Analog", "PDM", "TDM"}
static

◆ mime_pcm

const char * mime_pcm = "audio/pcm"
static

Mime type for PCM.

◆ RxTxModeNames

const char * RxTxModeNames
static
Initial value:
= {"UNDEFINED_MODE", "TX_MODE", "RX_MODE",
"RXTX_MODE"}

Text string (description) for RxTxMode.

◆ simpleUserCallback

class audio_tools::audio_tools::UserCallback * simpleUserCallback = nullptr

◆ timerAlarmRepeating [1/2]

AudioTimerDriverMBED * timerAlarmRepeating = nullptr
static

◆ timerAlarmRepeating [2/2]

AudioTimerDriverSTM32 * timerAlarmRepeating = nullptr
static

◆ timerAlarmRepeatingRef

AudioTimerDriverAVR * timerAlarmRepeatingRef = nullptr
static

◆ timerCallbackArray

class audio_tools::audio_tools::TimerCallback * timerCallbackArray = nullptr

◆ TimeUnitStr

const char * TimeUnitStr {"MS", "US", "HZ"}
static