Audio Streams¶
An Audio Element responsible for acquiring of audio data and then sending the data out after processing, is called the Audio Stream.
The following stream types are supported:
To set the stream type, use provided structure, e.g. i2s_stream_cfg_t for I2S stream, together with audio_stream_type_t enumerator.
See description below for the API details.
I2S Stream¶
When the I2S stream type is “writer”, the data may be sent either to a codec chip or to the internal DAC of ESP32. To simplify configuration, two macros are provided to cover each case:
I2S_STREAM_CFG_DEFAULT- the I2S stream is communicating with a codec chipI2S_STREAM_INTERNAL_DAC_CFG_DEFAULT- the stream data are sent to the DAC
Each macro configures several other stream parameters such as sample rate, bits per sample, DMA buffer length, etc.