:link_to_translation:zh_CN:[中文]
A playlist is a list of audio files that can be played back either sequentially or in a specified order.
The :cppsdcard_scan
function in the :component_file:`playlist/include/sdcard_scan.h` scans the audio files in a microSD card and generate a playlist of files. You can specify file depth and filter out file types when scanning. The playlist instances can be saved to a variety of storage media. The following are the supported storage media:
- Saving to MicroSD Card
- Saving to DRAM
- Saving to NVS Partition in Flash
- Saving to DATA_UNDEFINED Partition in Flash
After scanning the audio files, you can use the playlist_operator_handle_t
handle to call the corresponding functions to create, save, print playlists, and obtain the path corresponding to the audio ID. Currently, most of the storage media mentioned in this document support the above functions.
See the description below for the API details.
The :cppsdcard_scan
function can scan audio files in a specified path and generate playlists. It supports the scanning of files at a specified depth and filtering of file types. Then, the playlist can be saved to the specified storage medium using a callback function.
player/pipeline_sdcard_mp3_control
cli
The playlist can be stored in the microSD card. Functions, such as those to save and display the playlist, can be called through the playlist_operator_handle_t
handle.
player/pipeline_sdcard_mp3_control
cli
The playlist can be stored in DRAM. Functions, such as those to save and display the playlist, can be called through the playlist_operator_handle_t
handle.
The playlist can be stored in the NVS partition in flash. Functions, such as those to save and display the playlist, can be called through the playlist_operator_handle_t
handle.
The playlist can be stored in the DATA_UNDEFINED
partition (see Partition Tables for details) in flash. Functions, such as those to save and display the playlist, can be called through the playlist_operator_handle_t
handle. Please add the two partitions whose subtypes are 0x06 and 0x07 to the flash partition table first.
Playlist Manager manages the above playlists and can add multiple playlist instances to the playlist_handle_t
handle.