Read the Docs Template Documentation, Release
2.1.2 Audio Pipeline
Dynamic combination of a group of linked
is done using the Audio Pipeline. You do not deal with the
individual elements but with just one audio pipeline. Every element is connected by a ringbuffer. The Audio Pipeline
also takes care of forwarding messages from the element tasks to an application.
A diagram below presents organization of three elements, HTTP reader stream, MP3 decoder and I2S writer stream,
in the Audio Pipeline, that has been used in
example.
Fig. 2.3: Sample Organization of Elements in Audio Pipeline
API Reference
Header File
•
audio_pipeline/include/audio_pipeline.h
Functions
audio_pipeline_init
*
config
)
Initialize audio_pipeline_handle_t object audio_pipeline is responsible for controlling the audio data stream and
connecting the audio elements with the ringbuffer It will connect and start the audio element in order, responsible
for retrieving the data from the previous element and passing it to the element after it. Also get events from each
element, process events or pass it to a higher layer.
Return
• audio_pipeline_handle_t on success
• NULL when any errors
Parameters
•
config
: The configuration - audio_pipeline_cfg_t
esp_err_t
audio_pipeline_deinit
pipeline
)
This function removes all of the element’s links in audio_pipeline, cancels the registration of all events, invokes
the destroy functions of the registered elements, and frees the memory allocated by the init function. Briefly,
frees all memory.
Return
ESP_OK
Parameters
•
pipeline
: The Audio Pipeline Handle
2.1. Audio Framework
41
Summary of Contents for ESP32-LyraT
Page 1: ...Read the Docs Template Documentation Release Read the Docs Jul 01 2018...
Page 2: ......
Page 4: ...ii...
Page 6: ...Read the Docs Template Documentation Release 2 Contents...
Page 92: ...Read the Docs Template Documentation Release 88 Chapter 4 Resources...
Page 94: ...Read the Docs Template Documentation Release 90 Chapter 5 Copyrights and Licenses...