arduino-audio-tools
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
AudioTypes.h File Reference
#include "AudioToolsConfig.h"
#include "AudioTools/CoreAudio/AudioBasic/Collections/Vector.h"
#include "AudioTools/CoreAudio/AudioLogger.h"

Go to the source code of this file.

Classes

struct  AudioInfo
 Basic Audio information which drives e.g. I2S. More...
 
class  AudioInfoSource
 Supports the subscription to audio change notifications. More...
 
class  AudioInfoSupport
 Supports changes to the sampling rate, bits and channels. More...
 
class  AudioTime
 Tools for calculating timer values. More...
 
class  AudioWriter
 E.g. used by Encoders and Decoders. More...
 
class  NumberConverter
 Converts from a source to a target number with a different type. More...
 
class  VolumeSupport
 Supports the setting and getting of the volume. More...
 

Namespaces

namespace  audio_tools
 Generic Implementation of sound input and output for desktop environments using portaudio.
 

Macros

#define MIN(A, B)   ((A) < (B) ? (A) : (B))
 

Typedefs

using Pins = Vector< int >
 Type alias for a collection of pin numbers.
 
using sample_rate_t = uint32_t
 Type alias for sample rate values.
 

Enumerations

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 Formats. More...
 
enum  I2SSignalType { Digital , Analog , PDM , TDM }
 I2S Signal Types: Digital, Analog, PDM. More...
 
enum  MemoryType { RAM , PS_RAM , FLASH_RAM }
 Memory types. More...
 
enum  RxTxMode { 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  TimeUnit { MS , US , HZ }
 Time Units. More...
 

Functions

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

Variables

static const chari2s_formats []
 
static const chari2s_signal_types [] = {"Digital", "Analog", "PDM", "TDM"}
 
static const charmime_pcm = "audio/pcm"
 Mime type for PCM.
 
static const charRxTxModeNames [4]
 Text string (description) for RxTxMode.
 
static const charTimeUnitStr [3] {"MS", "US", "HZ"}
 

Macro Definition Documentation

◆ MIN

#define MIN (   A,
 
)    ((A) < (B) ? (A) : (B))