Auto Analog Audio  V1.3
TMRh20 2016 - Automatic DAC, ADC & Timers on Arduino Due
Automatic Analog Audio Library for Arduino

Auto Analog Audio (Automatic DAC, ADC & Timer) library

Goals:

Extremely low-latency digital audio recording, playback, communication and relaying at high speeds

Features:

The library internally configures timing based on user driven data requests or delivery, making data available or processing it at the appropriate speed without delays or while() loops.

The library can also be configured to operate at a set sample rate, with the getADC() and feedDAC() functions blocking until data is available or ready to be processed.

Arduino Due Default Pin Configuration:

Output: DAC0, DAC1 (12-bit)
Input: ADC (12-bit) on pin A0, configurable to pins A0-A6 with optional sampling on multiple pins
Audio Format: Easily up to 48Khz, 16-bit, Stereo, WAV format
Recording: Same as audio format, dependent on SD write speed.

Arduino Uno, Nano, Mega:
Output: Pins 9,10, PWM roughly 8-10bit for audio (based on timer speed)
Input: ADC (10-bit) on pin A0, configurable to any analog pin
Audio Format: Up to 24-32Khz, 8-bit, Mono, WAV format
Recording: 11-16khz WAV format. Requires SDFat lib. Dependent on SD write speed.

Library Source Code & Information:
http://github.com/TMRh20
http://tmrh20.blogspot.com