Skip to content

Audio Library internals

Frank edited this page Dec 24, 2020 · 18 revisions

The Audio Library uses 44100Hz, 16BIT sampling.

On of the used inputs or outputs is responsible for the timing. Usually, this is one of the I2S interfaces.

On the Teensy 3.x models, there is no official way to change the Sampling frequency - On Teensy 4, this is partly supported.

The heart of the library, AudioStream, is part if the Teensy core (Teensy 3 AudioStream.h AudioStream.cpp / Teensy 4 AudioStream.h AudioStream.cpp).
The AudioStream is responsible to call all other parts (such as inputs, outputs, effects, etc)

By default, it uses blocks of 128 Samples. So the duration of block is (128 / 44100) = 0,0029 seconds, or 2.9 milliseconds. This also defines the latency.

Clone this wiki locally